Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6992233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:36:27+00:00 2026-05-27T19:36:27+00:00

I have an application that has many threads processing data. As part of this

  • 0

I have an application that has many threads processing data. As part of this processing, it is writing a small file to a network share. I create the FileStream using the following code:

using (var fileStream = new FileStream("\\server\path\etc", FileMode.Create, FileAccess.Write, FileShare.None))

Under high load (writing under 100 files per second), the creation of the FileStream CAN take a long time (over 60 seconds). This occurs after the application is running under high load for a few minutes.

There must be something that’s blocking the thread when creating the FileStream. I thought maybe the threads were being blocked trying to create a connection to the file share. I checked my process via Process Explorer, but could not find a TCP connection to the file server. So I’m guessing that the SMB connection to the file server is not over TCP.

Does anyone have an idea what the problem is, or how I can do things differently to achieve better performance?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T19:36:28+00:00Added an answer on May 27, 2026 at 7:36 pm

    I suspect you are experiencing the problem described in this KB article: Shared file access is delayed if the file is open on another computer. I have personally seen this cause Microsoft Access to block for 30 seconds because it retried the operation 30 times, each blocking for a second. Perhaps this is an extension of this problem.

    If you try to open a file on a computer that is running Windows NT
    over the network and the file is open on another client computer that
    has sharing restrictions, there is a delay of approximately one second
    before the sharing violation error message is returned. If the client
    application is accessing a number of files on the server, this delay
    may become significant. These symptoms can be easily seen with any
    multi-user, file-based application, such as the Jet database engine
    that has shared database files.

    I would start with the suggestion of trying local files first and see what happens.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application that has many different types of objects that each persist
I have a multithreaded application that has many concurrent operations going on at once.
I'm writing an application that will have to be able to handle many concurrent
I'm writing an application that has a multiple producer, single consumer model (multiple threads
We have a .NET console app that has many foreground threads. If we kill
Background Information I have a distributed processing application that does data analysis. It is
I have an application that has many cases. Each case has many multipage tif
I have a thread in an application that has a loop like this: ...
We have an application that has to be flexible in how it displays it's
I have an application that has created a number of custom event log sources

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.