• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 182
  • Last Modified:

TCP Connection appears to time out

I have a client/server TCP .Net application. I am getting exceptions on NetStream.Read or Write operations, no data received, if there is a delay of about 10 minutes or longer.

The client app contacts the server. The client may send blobs (many reads and writes back and forth for each blob) of data to the server. The server may then send blobs of data back to the client. There can be a processing delay before each sent blob. Everything works with even large blobs going back and forth. The problem occurs when the processing delay before starting to send a blob becomes around 10 minutes.  For example: Connect, client sends a blob, server process for about 10 minutes, server tries to send a blob, error on first TCP write (read error on first TCP read on client). This problem does not occur if the client and server are on the same LAN. It only occurs when a client outside of the LAN connects through the Router via port forwarding to the server.

Is there some kind of router timeout setting I should be considering? Or maybe an "idling" parameter to tell the TCP connection to stay active for long periods of time?
0
MikeBroderick
Asked:
MikeBroderick
1 Solution
 
ste5anSenior DeveloperCommented:
10 minutes sounds like the default timeout values. 600 seconds is prominent value. Sounds like something inbetween or the server itself has a limit for inactive connections.

On the other hand, I would consider for long running tasks a job model. Send the blob enclosed in a job request. And poll the server for the finished job.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now