in reply to Re^2: threaded TCP server problem
in thread threaded TCP server problem
1: $thrcnt does not increment.
My mistake. I removed threads::shared to check something and forgot to put it back. Doing so will fix that and doesn't appear to cause much greater growth. With that put back it's ~ 7.7 MB after 10,000 connections.
2: on my system, it crashes on MS-Windows (ActivePerl-5.8.8.816)
I haven't tried AS 5.8.8 yet. I hadn't even noticed it was available. Maybe putting threads::shared back will help, though I don't see why it would. If you are on a multi-cpu system you should be locking the shared data before accesses, but that doesn't explain the crash without threads::shared.
If the problem persists, I'd revert 5.8.6 which, (not yet having tried 5.8.8), is the most stable version I've used. Otherwise, you'll need the skills and internals knowledge of dave_the_m and the others on p5p to resolve the problem.
One thing I have noticed is that if the client goes away without closing the connection, the thread will hang around and so consume memory. That may be curable by setting an appropriate timeout in IO::Socket somewhere?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: threaded TCP server problem
by Anonymous Monk on Mar 28, 2006 at 13:05 UTC | |
|
Re^4: threaded TCP server problem
by Anonymous Monk on Mar 28, 2006 at 06:17 UTC | |
by BrowserUk (Patriarch) on Mar 28, 2006 at 06:55 UTC |