This lost mysql connection is a similar phenomenon to one I have observed
where I have a couple of near simultaneous page hits.

I *think* its due to a cursor being declared globally and not being
threadsafe.

Perhaps a lock on the cursor might help? I'd like to know a good solution
to this myself!

--
Shayne O'Neill
http://perth.indymedia.org
I know how hard it is for you to put food on your family."
 ----George W. Bush

On Thu, 8 Apr 2004, 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 just
> before crashing:
>
> "Thu Apr  8 15:52:12
> 2004","Input.py","/home/webwadmin/ww_apps/environ/Input.py","_mysql_exceptions.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 script
> /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 respond
>     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 writeHTML
>     self.writeBody()
>   File "/usr/local/Webware-0.8.1/WebKit/Page.py", line 204, in writeBody
>     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 writeContent
>     self.samp = 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 __init__
>     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 = self._query(query)
>   File "/usr/lib/python2.2/site-packages/MySQLdb/cursors.py", line 168,
> in _query
>     rowcount = 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: [EMAIL PROTECTED]
> tel�fono/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
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
> _______________________________________________
> Webware-discuss mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/webware-discuss
>


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to