Author | Topic: Server Error - Read error 0 - Cause? | |
---|---|---|
Richard A. Pulliam | Server Error - Read error 0 - Cause? on Fri, 24 Sep 2004 08:41:26 -0400 Server Error Read error 0 This happens once in a while out of the clear blue sky. Any idea what can cause this? I get this but the WAA Server appears to still be running. If I stop it and start it again, the problem is solved. I really can not afford to have it down. Maybe there is a way to have some kind of program checking for status of WAA server and restart it when not available? Is it possible to somehow stop WAA1SRV.EXE by passing a parameter or something? Do I have to setup something for the number of connections I may have at one time? I am planning in setting a point of sale system with maybe up to 60 users linked to it. REM File: STARTWAA.BAT REM REM Purpose: Setting environment variables for REM WAA1SRV.EXE REM SET WAA_WORKERTHREADS=5 SET WAA_HOST=localhost SET WAA_PORT=80 SET WAA_TRACE=OFF SET WAA_DEVMODE=OFF SET WAA_INTERNAL_LOG=OFF start %1 waa1srv.exe <==== What is the parameter? Can not find any info on it. Thank you for your help. ClipperSolutions@yahoo.com or rpulliam@cingular-ats.com Richard | |
Phil Ide | Re: Server Error - Read error 0 - Cause? on Fri, 24 Sep 2004 14:09:35 +0100 Richard, > Server Error > Read error 0 Other people report this, but no reason or solution has been found yet. > Is it possible to somehow stop WAA1SRV.EXE by passing a parameter or > something? In one of your packages, add a form-function with a really weird name: Function YourMotherWasAHamsterAndYourFatherSmeltOfElderBerries() QUIT RETURN TRUE Next, craft a web page on your desktop which calls this function. e.g. <html><head> <script> var url = "http://192.168.xxx.xxx/cgi-bin/waa1gate.exe"; var pkg = "MyPackage"; var fnc = "YourMotherWasAHamsterAndYourFatherSmeltOfElderBerries"; document.location=url+'?WAA_PACKAGE'+pkg+'&WAA_FORM='+fnc; </script> </html> Click on the web page to shut down WAA. Alternatively, you can use my WAA relauncher app (#27 on my site). This shuts down WAA then relaunches it. I use this to restart WAA twice a day, and I don't have the problems you are having > Do I have to setup something for the number of connections I may have at one > time? I am planning in setting a point of sale system with maybe up to 60 > users linked to it. You might want to increase the number of worker threads, but with 60 users I doubt it. Keep an eye on the statistics page of the WAA console. Ideally you want 3 times as many threads as your peak load (this gives you lots of room for safety). Additionally, you might want to download my WebStats package (#68) which will analyse your WAA logs and tell you lots of things about the way your packages are being used that you would never have guessed at. One of the most important things it does is estimate the capacity based on the number of threads and overall usage (capacity being expressed in the average number of requests WAA can service per hour based on the average time to service a request as reported in your logs). > start %1 waa1srv.exe <==== > What is the parameter? Can not find any info on it. This is in case you want to do something like this: c:\>startwaa xppdbg ...which launches WAA in the debugger. Regards, Phil Ide *************************************** * Xbase++ FAQ, Libraries and Sources: * * goto: http://www.idep.org.uk/xbase * *************************************** Why do we drive on parkways and park on driveways? | |
Richard A. Pulliam | Re: Server Error - Read error 0 - Cause? on Fri, 24 Sep 2004 09:17:32 -0400 Thanks a million Phil! I am new at WAA and staggering through it. It is sure a blast! "Phil Ide" <phil@idep.org.uk> wrote in message news:1hj609bfbcsir$.dlg@idep.org.uk... > Richard, > > > Server Error > > Read error 0 > > Other people report this, but no reason or solution has been found yet. > > > Is it possible to somehow stop WAA1SRV.EXE by passing a parameter or > > something? > > In one of your packages, add a form-function with a really weird name: > > Function YourMotherWasAHamsterAndYourFatherSmeltOfElderBerries() > QUIT > RETURN TRUE > > Next, craft a web page on your desktop which calls this function. e.g. > > <html><head> > <script> > var url = "http://192.168.xxx.xxx/cgi-bin/waa1gate.exe"; > var pkg = "MyPackage"; > var fnc = "YourMotherWasAHamsterAndYourFatherSmeltOfElderBerries"; > document.location=url+'?WAA_PACKAGE'+pkg+'&WAA_FORM='+fnc; > </script> > </html> > > Click on the web page to shut down WAA. > > Alternatively, you can use my WAA relauncher app (#27 on my site). This > shuts down WAA then relaunches it. I use this to restart WAA twice a day, > and I don't have the problems you are having > > > Do I have to setup something for the number of connections I may have at one > > time? I am planning in setting a point of sale system with maybe up to 60 > > users linked to it. > > You might want to increase the number of worker threads, but with 60 users > I doubt it. Keep an eye on the statistics page of the WAA console. > Ideally you want 3 times as many threads as your peak load (this gives you > lots of room for safety). > > Additionally, you might want to download my WebStats package (#68) which > will analyse your WAA logs and tell you lots of things about the way your > packages are being used that you would never have guessed at. One of the > most important things it does is estimate the capacity based on the number > of threads and overall usage (capacity being expressed in the average > number of requests WAA can service per hour based on the average time to > service a request as reported in your logs). > > > start %1 waa1srv.exe <==== > > What is the parameter? Can not find any info on it. > > This is in case you want to do something like this: > > c:\>startwaa xppdbg > > ...which launches WAA in the debugger. > > Regards, > -- > Phil Ide > > *************************************** > * Xbase++ FAQ, Libraries and Sources: * > * goto: http://www.idep.org.uk/xbase * > *************************************** > > Why do we drive on parkways and park on driveways? | |
Richard A. Pulliam | Re: Server Error - Read error 0 - Cause? on Fri, 24 Sep 2004 17:07:22 -0400 Got the blasted Server Error - read error 0 again. It appears that the solution is to have a polling program running that will get a returned value from the DLL, if it does not get it, it means the server got disconnected and it is time to restart waa1serv.exe. Can anyone think of a better way to do this? "Richard A. Pulliam" <rpulliam@cingular-ats.com> wrote in message news:6JhWZjjoEHA.6380@S15147418... > Thanks a million Phil! I am new at WAA and staggering > through it. It is sure a blast! > > > "Phil Ide" <phil@idep.org.uk> wrote in message > news:1hj609bfbcsir$.dlg@idep.org.uk... > > Richard, > > > > > Server Error > > > Read error 0 > > > > Other people report this, but no reason or solution has been found yet. > > > > > Is it possible to somehow stop WAA1SRV.EXE by passing a parameter or > > > something? > > > > In one of your packages, add a form-function with a really weird name: > > > > Function YourMotherWasAHamsterAndYourFatherSmeltOfElderBerries() > > QUIT > > RETURN TRUE > > > > Next, craft a web page on your desktop which calls this function. e.g. > > > > <html><head> > > <script> > > var url = "http://192.168.xxx.xxx/cgi-bin/waa1gate.exe"; > > var pkg = "MyPackage"; > > var fnc = "YourMotherWasAHamsterAndYourFatherSmeltOfElderBerries"; > > document.location=url+'?WAA_PACKAGE'+pkg+'&WAA_FORM='+fnc; > > </script> > > </html> > > > > Click on the web page to shut down WAA. > > > > Alternatively, you can use my WAA relauncher app (#27 on my site). This > > shuts down WAA then relaunches it. I use this to restart WAA twice a day, > > and I don't have the problems you are having > > > > > Do I have to setup something for the number of connections I may have at > one > > > time? I am planning in setting a point of sale system with maybe up to > 60 > > > users linked to it. > > > > You might want to increase the number of worker threads, but with 60 users > > I doubt it. Keep an eye on the statistics page of the WAA console. > > Ideally you want 3 times as many threads as your peak load (this gives you > > lots of room for safety). > > > > Additionally, you might want to download my WebStats package (#68) which > > will analyse your WAA logs and tell you lots of things about the way your > > packages are being used that you would never have guessed at. One of the > > most important things it does is estimate the capacity based on the number > > of threads and overall usage (capacity being expressed in the average > > number of requests WAA can service per hour based on the average time to > > service a request as reported in your logs). > > > > > start %1 waa1srv.exe <==== > > > What is the parameter? Can not find any info on it. > > > > This is in case you want to do something like this: > > > > c:\>startwaa xppdbg > > > > ...which launches WAA in the debugger. > > > > Regards, > > -- > > Phil Ide > > > > *************************************** > > * Xbase++ FAQ, Libraries and Sources: * > > * goto: http://www.idep.org.uk/xbase * > > *************************************** > > > > Why do we drive on parkways and park on driveways? > > | |
Phil Ide | Re: Server Error - Read error 0 - Cause? on Mon, 27 Sep 2004 09:49:55 +0100 Richard, > Got the blasted Server Error - read error 0 again. > > It appears that the solution is to have a polling program running that will > get a returned value from the DLL, if it does not get it, it means the > server > got disconnected and it is time to restart waa1serv.exe. Can anyone think > of a better way to do this? Similar concept, different method. In your package-dll's _register() function, launch a new thread which opens a socket to another machine and sends an 'ok' signal and drops the connection. If it can't open the socket (the host application isn't available), just ignore the error. Set this thread to re-start every 15 seconds. On your desktop, run an app which listens for the connection from that thread. If it doesn't receive a connection from WAA within 35 seconds, it has missed 2 attempts and so there is a problem with WAA. The resources required by WAA to run this thread and send the signal are minimal, including CPU and network resources. Regards, Phil Ide *************************************** * Xbase++ FAQ, Libraries and Sources: * * goto: http://www.idep.org.uk/xbase * *************************************** Best way to be useful - stay out of the way. | |
Richard A. Pulliam | Re: Server Error - Read error 0 - Cause? on Mon, 27 Sep 2004 09:47:09 -0400 I changed my log settings so it gave me more detail as to what is going on. The following is the error I get reported to the log when I get the Server Error - Read error 0. This can happen aparently at any time. Socket write error. I know is not my code. It definetely seens to be a WAA error. [09/27/2004 09:22:33][#16:End][//TC/LookupIPAddress] elapsed time [0.19] [09/27/2004 09:22:36][#7:Pkg][//TC/TakeAction] request at [192.168.4.200] *** [#7:Cgi][WAA_ACTION = Punch Clock WAA_ID = DEVERS WAA_LOC = ADMINISTRATION WAA_PACKAGE = TC WAA_FORM = TakeAction] [09/27/2004 09:22:36][#7:End][//TC/TakeAction] elapsed time [0.00] [09/27/2004 09:22:40][#7:Pkg][//TC/AskForPunchIn] request at [192.168.4.200] *** [#7:Cgi][WAA_PACKAGE = TC WAA_FORM = AskForPunchIn WAA_ID = DEVERS WAA_LOC = ADMINISTRATION WAA_FIELDS = LOCATION,DATE_IN,TIME_IN,DATE_OUT,TIME_OUT WAA_FILTER = TIMES->ID='DEVERS' .AND. TIMES->DATE_IN >= CTOD('09/13/2004')] [09/27/2004 09:22:40][#7:End][//TC/AskForPunchIn] elapsed time [0.26] [09/27/2004 09:22:51] *** ----------------------------------------------------------- [09/27/2004 09:22:51] *** worker #7 Error: [09/27/2004 09:22:51] *** e:canDefault :.F. e:canRetry :.F. e:canSubstitute:.F. e:description : e:filename : e:genCode :0 e:operation :Socket write error e:osCode :0 e:severity :0 e:subCode :0 e:subSystem : e:thread :7 e:tries :0 e:cargo : Callstack: CGICHANNEL:GETENV(233) CONTEXT:GETENV(95) CONTEXT:GETCOOKIES(73) SESSION:RESUME(501) RESUMESESSION(364) SERVEJOB(295) SERVEJOBPROTECTION(205) [09/27/2004 09:22:51] *** ----------------------------------------------------------- [09/27/2004 09:22:51] *** worker #7 Request not completed [09/27/2004 09:23:05] *** ----------------------------------------------------------- [09/27/2004 09:23:05] *** worker #16 Error: [09/27/2004 09:23:05] *** e:canDefault :.F. e:canRetry :.F. e:canSubstitute:.F. e:description : e:filename : e:genCode :0 e:operation :Socket write error e:osCode :0 e:severity :0 e:subCode :0 e:subSystem : e:thread :16 e:tries :0 e:cargo : Callstack: CGICHANNEL:GETENV(233) CONTEXT:GETENV(95) CONTEXT:GETCOOKIES(73) SESSION:RESUME(501) RESUMESESSION(364) SERVEJOB(295) SERVEJOBPROTECTION(205) [09/27/2004 09:23:05] *** ----------------------------------------------------------- [09/27/2004 09:23:05] *** worker #16 Request not completed [09/27/2004 09:29:50] *** ----------------------------------------------------------- "Phil Ide" <phil@idep.org.uk> wrote in message news:1w6lvyu8t5xfr.dlg@idep.org.uk... > Richard, > > > Got the blasted Server Error - read error 0 again. > > > > It appears that the solution is to have a polling program running that will > > get a returned value from the DLL, if it does not get it, it means the > > server > > got disconnected and it is time to restart waa1serv.exe. Can anyone think > > of a better way to do this? > > Similar concept, different method. > > In your package-dll's _register() function, launch a new thread which opens > a socket to another machine and sends an 'ok' signal and drops the > connection. If it can't open the socket (the host application isn't > available), just ignore the error. > > Set this thread to re-start every 15 seconds. > > On your desktop, run an app which listens for the connection from that > thread. If it doesn't receive a connection from WAA within 35 seconds, it > has missed 2 attempts and so there is a problem with WAA. > > The resources required by WAA to run this thread and send the signal are > minimal, including CPU and network resources. > > Regards, > -- > Phil Ide > > *************************************** > * Xbase++ FAQ, Libraries and Sources: * > * goto: http://www.idep.org.uk/xbase * > *************************************** > > Best way to be useful - stay out of the way. | |
Richard A. Pulliam | Re: Server Error - Read error 0 - Cause? on Mon, 27 Sep 2004 09:58:17 -0400 The following is the error that appears on my WAA log: [09/27/2004 09:22:33][#16:End][//TC/LookupIPAddress] elapsed time [0.19] [09/27/2004 09:22:36][#7:Pkg][//TC/TakeAction] request at [192.168.4.200] *** [#7:Cgi][WAA_ACTION = Punch Clock WAA_ID = DEVERS WAA_LOC = ADMINISTRATION WAA_PACKAGE = TC WAA_FORM = TakeAction] [09/27/2004 09:22:36][#7:End][//TC/TakeAction] elapsed time [0.00] [09/27/2004 09:22:40][#7:Pkg][//TC/AskForPunchIn] request at [192.168.4.200] *** [#7:Cgi][WAA_PACKAGE = TC WAA_FORM = AskForPunchIn WAA_ID = DEVERS WAA_LOC = ADMINISTRATION WAA_FIELDS = LOCATION,DATE_IN,TIME_IN,DATE_OUT,TIME_OUT WAA_FILTER = TIMES->ID='DEVERS' .AND. TIMES->DATE_IN >= CTOD('09/13/2004')] [09/27/2004 09:22:40][#7:End][//TC/AskForPunchIn] elapsed time [0.26] [09/27/2004 09:22:51] *** ----------------------------------------------------------- [09/27/2004 09:22:51] *** worker #7 Error: [09/27/2004 09:22:51] *** e:canDefault :.F. e:canRetry :.F. e:canSubstitute:.F. e:description : e:filename : e:genCode :0 e:operation :Socket write error e:osCode :0 e:severity :0 e:subCode :0 e:subSystem : e:thread :7 e:tries :0 e:cargo : Callstack: CGICHANNEL:GETENV(233) CONTEXT:GETENV(95) CONTEXT:GETCOOKIES(73) SESSION:RESUME(501) RESUMESESSION(364) SERVEJOB(295) SERVEJOBPROTECTION(205) [09/27/2004 09:22:51] *** ----------------------------------------------------------- [09/27/2004 09:22:51] *** worker #7 Request not completed [09/27/2004 09:23:05] *** ----------------------------------------------------------- [09/27/2004 09:23:05] *** worker #16 Error: [09/27/2004 09:23:05] *** e:canDefault :.F. e:canRetry :.F. e:canSubstitute:.F. e:description : e:filename : e:genCode :0 e:operation :Socket write error e:osCode :0 e:severity :0 e:subCode :0 e:subSystem : e:thread :16 e:tries :0 e:cargo : Callstack: CGICHANNEL:GETENV(233) CONTEXT:GETENV(95) CONTEXT:GETCOOKIES(73) SESSION:RESUME(501) RESUMESESSION(364) SERVEJOB(295) SERVEJOBPROTECTION(205) [09/27/2004 09:23:05] *** ----------------------------------------------------------- [09/27/2004 09:23:05] *** worker #16 Request not completed [09/27/2004 09:29:50] *** ----------------------------------------------------------- "Phil Ide" <phil@idep.org.uk> wrote in message news:1w6lvyu8t5xfr.dlg@idep.org.uk... > Richard, > > > Got the blasted Server Error - read error 0 again. > > > > It appears that the solution is to have a polling program running that will > > get a returned value from the DLL, if it does not get it, it means the > > server > > got disconnected and it is time to restart waa1serv.exe. Can anyone think > > of a better way to do this? > > Similar concept, different method. > > In your package-dll's _register() function, launch a new thread which opens > a socket to another machine and sends an 'ok' signal and drops the > connection. If it can't open the socket (the host application isn't > available), just ignore the error. > > Set this thread to re-start every 15 seconds. > > On your desktop, run an app which listens for the connection from that > thread. If it doesn't receive a connection from WAA within 35 seconds, it > has missed 2 attempts and so there is a problem with WAA. > > The resources required by WAA to run this thread and send the signal are > minimal, including CPU and network resources. > > Regards, > -- > Phil Ide > > *************************************** > * Xbase++ FAQ, Libraries and Sources: * > * goto: http://www.idep.org.uk/xbase * > *************************************** > > Best way to be useful - stay out of the way. | |
Bruce Anderson | Re: Server Error - Read error 0 - Cause? on Mon, 27 Sep 2004 10:52:56 -0500 I, too, have been plagued by the "socket write" error. In my case, it is in one application, in one section, and has one predictable behavior. The section has to do with registering people for meetings and collecting the attendance fee money. There are six steps in this process. The process will run flawlessly for three complete iterations of this process, however, after the third instance of executing step 6, sometime in the fourth iteration of the process, and it can be at any step, there will be a socket write error involving a thread that does not appear to be involved in processing any request. I plan to start trial and error searching for the damning thing, but at the moment, we are busily booking people for a meeting later this week, so it will have to wait a few days. Right now the great solution is that we run three credit cards and restart WAA. Most perplexing, an earlier version of this code never had any socket write error. Also, all other processes in this application run correctly all of the time. It is something about crossing my Rubicon of step 6 that is the problem. Bruce Anderson who notes that in Houston, we park on the driveway and we also park on the parkway, but we call it traffic. | |
Bruce Anderson | Re: Server Error - Read error 0 - Cause? on Mon, 27 Sep 2004 13:53:01 -0500 Flailing about here trying to figure out why my application is trying to write something when it gets the socket write error. From the WAA documentation..."After :footer() is called in a form-function, the function must return .T. (true) to instruct the WAA server to send the assembled HTML page." Question: Does it matter what value(s) are returned by any child function(s) called within the DLL function called via the hidden input "WAA_FORM"? I have assumed that, so long as the _register() ref'd function returns .T., it does not matter, as in this example. Wrong? FUNCTION CUSTOMER_INFO( oHtml, oContext ) oHtml:put([<html>]) oHtml:put([<head></head>]) oHtml:put([<body>]) oHtml:put([<FORM NAME="fS" onsubmit="return Validator(this)" ACTION="/cgi-bin/waa1gate.isa" METHOD=POST>]) customer_basic( oHtml, look_up_name( ) ) oHtml:put([<input type=hidden name="WAA_PACKAGE" value="MY_DLL">]) oHtml:put([<input type=hidden name="WAA_FORM" value="SAVE_CUSTOMER">]) oHtml:put([<input type=submit value="SAVE CHANGES">]) oHtml:put([</form>]) oHtml:put([</body>]) oHtml:put([</html>]) return .T. FUNCTION LOOK_UP_NAME() ...magical stuff to locate proper record... return ( CUSTOMER->LAST_NAME ) FUNCTION CUSTOMER_BASIC( oHtml, cLastName ) oHtml:put([Name: <input type=text name="m_LAST_NAME" value="] + cLastName + [" size=20>]) return nil | |
Martin Altmann | Re: Server Error - Read error 0 - Cause? on Mon, 27 Sep 2004 21:23:43 +0200 Bruce, yup! Well, that should read as you are correct in your assumptions - your code-snippet is correct! Apart from that I - personally - would prefer writing "procedure" instead of "function" if there is no returnvalue (like in your CUSTOMER_BASIC-function) Regards, Martin | |
Richard A. Pulliam | Re: Server Error - Read error 0 - Cause? on Mon, 27 Sep 2004 17:12:52 -0400 One solution to Socket write error problem is attached. Reads log file. If it finds "Socket write error", stops waa1srv.exe and restarts it. "Martin Altmann" <Altmann@altem.de> wrote in message news:zP7HoeMpEHA.6380@S15147418... > Bruce, > yup! > Well, that should read as you are correct in your assumptions - your > code-snippet is correct! > Apart from that I - personally - would prefer writing "procedure" instead of > "function" if there is no returnvalue (like in your CUSTOMER_BASIC-function) > > Regards, > Martin > > checkwaa.zip | |
Richard A. Pulliam | Re: Server Error - Read error 0 - Cause? on Mon, 27 Sep 2004 17:10:15 -0400 Attached is a procedure I just put together, minus some of my functions which I am sure you can replace. What it does: Every 2 seconds reads the latest waa1nnnn.log file and looks for text "Socket write error". If it finds it, it stops WAA1SRV.EXE and 1.5 seconds later, it starts it back up. Uses a process.exe that I found from a free download site. Works good. I still believe problem is a WAA1SRV.EXE bug. Richard "Bruce Anderson" <banderson@graphical-db.com> wrote in message news:SvIt3MMpEHA.5064@S15147418... > Flailing about here trying to figure out why my application is trying to > write something when it gets the socket write error. From the WAA > documentation..."After :footer() is called in a form-function, the function > must return .T. (true) to instruct the WAA server to send the assembled HTML > page." > Question: Does it matter what value(s) are returned by any child > function(s) called within the DLL function called via the hidden input > "WAA_FORM"? I have assumed that, so long as the _register() ref'd function > returns .T., it does not matter, as in this example. Wrong? > > FUNCTION CUSTOMER_INFO( oHtml, oContext ) > oHtml:put([<html>]) > oHtml:put([<head></head>]) > oHtml:put([<body>]) > oHtml:put([<FORM NAME="fS" onsubmit="return Validator(this)" > ACTION="/cgi-bin/waa1gate.isa" METHOD=POST>]) > customer_basic( oHtml, look_up_name( ) ) > oHtml:put([<input type=hidden name="WAA_PACKAGE" value="MY_DLL">]) > oHtml:put([<input type=hidden name="WAA_FORM" value="SAVE_CUSTOMER">]) > oHtml:put([<input type=submit value="SAVE CHANGES">]) > oHtml:put([</form>]) > oHtml:put([</body>]) > oHtml:put([</html>]) > return .T. > > FUNCTION LOOK_UP_NAME() > ...magical stuff to locate proper record... > return ( CUSTOMER->LAST_NAME ) > > FUNCTION CUSTOMER_BASIC( oHtml, cLastName ) > oHtml:put([Name: <input type=text name="m_LAST_NAME" value="] + > cLastName + [" size=20>]) > return nil > > CHECKWAA.ZIP |