From: Eduardo E. <eel...@na...> - 2004-04-08 22:45:51
|
David, Thank you for your answer, but I'm not using that method. In fact, it's a simple form that works pretty well most of the time. The problem is some users (don't ask me why) double-click submit buttons. Usually they receive an error message (because the record was already updated), but sometimes happens the problem I described. Anyway, I'll review my code again. Ed. David London wrote: >Eduardo, >Just looking at the error message I would be tempted to say that you ar= e >experiencing a similar problem to what I had discovered. What I had >found was that if all of your code was in the context directory and you >were using forwarding or callMethodOfServlet on a derived class >something went wrong with the import and produced a similar set of erro= r >messages. >There were 2 possible fixes; 1) use the CVS versions of Webkit (or at >least ServletFactory.py) or 2) move all of the source code into a >subdirectory of the context. Why option 2 works is a mystery to me, but >it did. > >Although I ended up with an error message, not a crash. > >Best of Luck >David London > >On Thu, 2004-04-08 at 15:56, Eduardo Elgueta wrote: > > >>Hi All, >> >>WebKit dies with no error message when a user presses repeatedly the >>submit button (the user can press the button two or three times before= >>receiving an error message from Apache). >> >>The page in question saves posted form data to a MySQL database using >>MySQLdb. >> >>Sometimes, the following error message (in Errors.csv) is recorded jus= t >>before crashing: >> >>"Thu Apr 8 15:52:12 >>2004","Input.py","/home/webwadmin/ww_apps/environ/Input.py","_mysql_ex= ceptions.OperationalError","(2013, >>'Lost connection to MySQL server during >>query')","/home/webwadmin/ww_apps/ErrorMsgs/Error-Input.py-2004-04-08-= 15-52-12-44505.html" >> >>This is the traceback: >> >>[Thu Apr 8 15:52:42 2004] [error] WebKit: Error while executing scrip= t >>/home/webwadmin/ww_apps/environ/Input.py >>Traceback (most recent call last): >> File "/usr/local/Webware-0.8.1/WebKit/Application.py", line 415, in >>dispatchRequest >> self.handleGoodURL(transaction) >> File "/usr/local/Webware-0.8.1/WebKit/Application.py", line 567, in >>handleGoodURL >> self.respond(transaction) >> File "/usr/local/Webware-0.8.1/WebKit/Application.py", line 776, in >>respond >> transaction.respond() >> File "/usr/local/Webware-0.8.1/WebKit/Transaction.py", line 105, in >>respond >> self._servlet.respond(self) >> File "/usr/local/Webware-0.8.1/WebKit/HTTPServlet.py", line 38, in r= espond >> method(trans) >> File "/home/webwadmin/ww_apps/navix/NvxStdPage.py", line 13, in >>respondToPost >> self._respond(transaction) >> File "/usr/local/Webware-0.8.1/WebKit/Page.py", line 73, in _respond >> self.writeHTML() >> File "/usr/local/Webware-0.8.1/WebKit/Page.py", line 135, in writeHT= ML >> self.writeBody() >> File "/usr/local/Webware-0.8.1/WebKit/Page.py", line 204, in writeBo= dy >> self.writeBodyParts() >> File "/home/webwadmin/ww_apps/environ/InnerPage.py", line 40, in >>writeBodyParts >> EnvStdPage.writeBodyParts(self) >> File "/home/webwadmin/ww_apps/navix/NvxStdPage.py", line 42, in >>writeBodyParts >> self.writeContent() >> File "/home/webwadmin/ww_apps/environ/Input.py", line 76, in writeCo= ntent >> self.samp =3D DBSample(self.ses) >> File "/home/webwadmin/ww_apps/environ/AppObjects.py", line 103, in >>__init__ >> NvxDBObject.__init__(self, ses, 'sample') >> File "/home/webwadmin/ww_apps/navix/NvxDBObject.py", line 21, in __i= nit__ >> self.loadDescription() >> File "/home/webwadmin/ww_apps/navix/NvxDBObject.py", line 26, in >>loadDescription >> c.execute(qry) >> File "/usr/lib/python2.2/site-packages/MySQLdb/cursors.py", line 61,= >>in execute >> r =3D self._query(query) >> File "/usr/lib/python2.2/site-packages/MySQLdb/cursors.py", line 168= , >>in _query >> rowcount =3D self._BaseCursor__do_query(q) >> File "/usr/lib/python2.2/site-packages/MySQLdb/cursors.py", line 112= , >>in __do_query >> db.query(q) >>OperationalError: (2013, 'Lost connection to MySQL server during query= ') >> >>Any hints, suggestions, pointers? Is there any "debug mode" available >>for webki? >> >>TIA, >> >>Ed. >> >> > > > -- Eduardo Elgueta Senior Consultant Navix correo/email: eel...@na... tel=E9fono/phone: +56 (2) 209-8905 celular/mobile: +56 (9) 821-0033 web: www.navix.cl Av. Pedro de Valdivia 555 Of. 216 Providencia 7500913 Santiago, Chile |