none
Azure WebJob System.IO.IOException: The semaphore timeout period has expired. RRS feed

  • Question

  • Hey!

    Could someone tell me why is this error happening sometimes in my triggered webjob?

    Unhandled Exception: System.IO.IOException: The semaphore timeout period has expired.

    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

    It throws it on this line:

    var file_list = Directory.EnumerateFiles(Path, "*.xml", SearchOption.TopDirectoryOnly)


    Thanks in advance!

    Tuesday, May 21, 2019 7:18 AM

All replies

  • Hi xaintt,

    Thank you for posting here.

    Based on your description, you want to solve the exception that 'The semaphore timeout period has expired'.

    I have tested the code you provided, it works well. I want to know what your current project is. If your project is related to azure, you could post in their forum.


    Result:

    Best Regards,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.



    Tuesday, May 21, 2019 7:50 AM
    Moderator
  • Hi!

    Thank you for your answer!

    As I've said, it is an Azure WebJob. Another info is that the folder contains ~22500 xmls. (Maybe it has to do something with the timeout)

    I'm trying to move the already processed files into another folder to see if it solves the problem.

    Monday, May 27, 2019 1:27 PM