Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Help with socket problem...

Help with socket problem...

Scheduled Pinned Locked Moved C#
sysadminhelpquestiondiscussion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Aaron Dilliard
    wrote on last edited by
    #1

    I have a server which updates programs on our local network, informs of notifications, etc... The problem is that after so long it will "lock up" and stop accepting connections. I have connected/disconnected clients and tested everywhere for a solution to the problem. There is actually a series of about 6 servers on different ports, and all of them quit accepting at once. The MainSocket is using Socket.BeginAccept and waiting for connections, then passes them off to a data structure I created to maintain the connections/user info/etc. Is there a certain period of "idle time" when the Framework aborts that thread? It seems like if that were the case, however, you wouldnt even be able to connect to the server. As it is, you can get a connection, you just cant communicate. I know without seeing the code it may be hard to determine a solution, but Im not sure exactly what the problem is. Any thoughts or comments would be appreciated... Aaron

    T L 2 Replies Last reply
    0
    • A Aaron Dilliard

      I have a server which updates programs on our local network, informs of notifications, etc... The problem is that after so long it will "lock up" and stop accepting connections. I have connected/disconnected clients and tested everywhere for a solution to the problem. There is actually a series of about 6 servers on different ports, and all of them quit accepting at once. The MainSocket is using Socket.BeginAccept and waiting for connections, then passes them off to a data structure I created to maintain the connections/user info/etc. Is there a certain period of "idle time" when the Framework aborts that thread? It seems like if that were the case, however, you wouldnt even be able to connect to the server. As it is, you can get a connection, you just cant communicate. I know without seeing the code it may be hard to determine a solution, but Im not sure exactly what the problem is. Any thoughts or comments would be appreciated... Aaron

      T Offline
      T Offline
      Tom Wright
      wrote on last edited by
      #2

      did you say that all disconnect or stop accepting connections at the same time? Have you tried running the server and client on your machine to see if they stay up and running? What about traping the socket errors are they reporting anything? T Tom Wright tawright915@yahoo.com

      A 1 Reply Last reply
      0
      • T Tom Wright

        did you say that all disconnect or stop accepting connections at the same time? Have you tried running the server and client on your machine to see if they stay up and running? What about traping the socket errors are they reporting anything? T Tom Wright tawright915@yahoo.com

        A Offline
        A Offline
        Aaron Dilliard
        wrote on last edited by
        #3

        Yes, that is how I tested them to get the bugs out (On My Machine). It takes a good 2 days or so before they stop accepting connections, however, and debugging for that long really isnt feasible, because it doesnt always happen. It does report errors, but the error logs dont report anything unusual, client connected/disconnected, updating database, etc. Nothing that should clog the server like that. Thanks... Aaron

        1 Reply Last reply
        0
        • A Aaron Dilliard

          I have a server which updates programs on our local network, informs of notifications, etc... The problem is that after so long it will "lock up" and stop accepting connections. I have connected/disconnected clients and tested everywhere for a solution to the problem. There is actually a series of about 6 servers on different ports, and all of them quit accepting at once. The MainSocket is using Socket.BeginAccept and waiting for connections, then passes them off to a data structure I created to maintain the connections/user info/etc. Is there a certain period of "idle time" when the Framework aborts that thread? It seems like if that were the case, however, you wouldnt even be able to connect to the server. As it is, you can get a connection, you just cant communicate. I know without seeing the code it may be hard to determine a solution, but Im not sure exactly what the problem is. Any thoughts or comments would be appreciated... Aaron

          L Offline
          L Offline
          leppie
          wrote on last edited by
          #4

          How are you running this? Windows service? ASP.NET? Windows app? Command line? Different/same PC? Maybe the hardware is going into power saving mode...

          xacc.ide-0.1.3.2

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups