View previous topic :: View next topic |
Author |
Message |
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Mon Apr 12, 2004 8:03 pm Post subject: Win32 Dsc Issues |
|
|
Dsc Beta 3:
-- testHttpServer :
After <enter> pressed in console, outputs many lines of "Socket accept() failed"
System: Compaq Presario 1.4 Ghz Centrino and 256 MB ram with Windows XP Home Edition.
I will look at other unittests shortly. |
|
Back to top |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Mon Apr 12, 2004 8:34 pm Post subject: Dsc Beta 3: testServletEngine() |
|
|
Dsc Beta 3 continued:
-- testServletEngine :
After <enter> pressed, servlet iterates normally in console for about 11 seconds then suddenly ends with multiple lines of "Socket accept() failed" (much the same as the HttpServer output). |
|
Back to top |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Mon Apr 12, 2004 9:03 pm Post subject: |
|
|
Dsc Beta 3 continued:
-- testUri : works!
-- testFileSize : works!
-- testFilePath : works!
-- testFileList : works!
-- testFile1 : works!
-- testFile5 : works!
-- testToken1 : works!
-- testColumn : ----> not working unitl 0.83 release
-- testSocket : works!
-- testStdin : works!
-- testBuffer : works!
-- testToken3 : works!
-- testFileRegex : works!
-- testLineRegex : works!
-- testSocketRegex : works!
-- testRandomAccess : works!
-- testCompositeIO : works!
-- testDirectIO : works!
Now, I guess I may do some independent tests and try to stress things a little more . |
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Tue Apr 13, 2004 1:13 am Post subject: Re: Win32 Dsc Issues |
|
|
JJR wrote: | Dsc Beta 3:
-- testHttpServer :
After <enter> pressed in console, outputs many lines of "Socket accept() failed"
System: Compaq Presario 1.4 Ghz Centrino and 256 MB ram with Windows XP Home Edition.
|
Just out of curiosity, which WinSock library are you using John? Is it the one packaged in the zip file, or something else? That's perhaps a dumb question, but I wonder why this stuff operates perfectly on Win2K?
For what it's worth, I'm using Win2K SP2 ... I thought for a minute you might be running into the artificial connection limit that MS stamps upon certain versions (yes, they do that), but then I should perhaps hit that also with Win2K (non server)?
Can I ask you to perhaps mess around with the other arguments for the HttpServer constructor? For example I wonder if changing the "backlog" settings would alter the WinXP behaviour?
Code: | // create a (1 thread) server with 50 backlog requests
HttpServer server = new HttpServer (provider, addr, 1, 50); |
Thinking about this some more, I suspect you are perhaps hitting an artificial limit in WinXP HE. Similarly, there's probably some linux kernel setting that would take care of the same problem over there. This may seem like an innocuous little test-jig, but it truly stresses the hell out of the OS Socket layer ... (you are actually running a high-performance HTTP Server: one that doesn't work on anything but Win2K <g>).
I think I should seek expert advice from CM ... |
|
Back to top |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Tue Apr 13, 2004 2:17 am Post subject: |
|
|
Arghh!
You seem to be right!
Seems I inadvertantly deleted the provided winsock library while doing cleanup/recompiles in the obj directory.
It was probably linking to some older version (I have the whole digitalmars c++ suite also installed). I'll try it out again!
Sorry!
John
Last edited by JJR on Tue Apr 13, 2004 2:29 am; edited 1 time in total |
|
Back to top |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Tue Apr 13, 2004 2:24 am Post subject: |
|
|
Nope.... Same errors.
I'll move on to experiment with your other suggestions when I'm off work tomorrow. I've heard about certain limitations to XP HE, but I didn't realize that they applied here. That's very annoying if you ask me! Such things shouldn't be regulated! ERrrrrrr.... got to count to 10....
Later,
John |
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Wed Apr 14, 2004 9:01 pm Post subject: |
|
|
(copied from the linux thread)
Thanks primarily to John, the Socket woes have been nailed down to a simple case of running out of available socket handles. I'm working on a combination of SO_LINGER and socket.shutdown to ensure such resources are harvested asap by the OS.
- Kris |
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Thu Apr 15, 2004 3:54 pm Post subject: |
|
|
testHttpServer() now runs on WinXP HE. I guess XP-HE was not expecting anyone to use 200,000 sockets in a rather short period of time |
|
Back to top |
|
|
|