Geoffrey Talvola wrote:

It would be good to determine if individual threads in the thread pool are
getting locked up, which would eventually reduce your threads from its
initial pool of 10 threads (or whatever) to 0 threads -- at that point the
application will be locked up.  I would recommend placing a call like this:

    print '***** starting request on thread',
threading.currentThread().getName()

at the beginning of RequestHandler.handleRequest in ThreadedAppServer.py,
and

    print '***** done with request on thread',
threading.currentThread().getName()

at the end of that method.  Then you will be able to examine your logfile to
see if threads are getting wedged in the middle of a request.

finally it seems i've traced something interesting, the folling is the output of nohup.out file:

*** Starting request on thread Thread-9
  341  2004-09-07 14:59:18  /products/
  341  0.07 secs            /products/

*** Done with request on thread Thread-9
*** Starting request on thread Thread-11
  342  2004-09-07 15:00:41  /dealerarea/
  342  0.02 secs            /dealerarea/

*** Done with request on thread Thread-11  <--- ok until here
*** Starting request on thread Thread-10
  343  2004-09-07 15:00:48  /news/
*** Starting request on thread Thread-12
  344  2004-09-07 15:04:16  /
*** Starting request on thread Thread-13
  345  2004-09-07 15:05:15  /news/
*** Starting request on thread Thread-9
  346  2004-09-07 15:05:37  /it/index.py
  346  0.04 secs            /it/index.py

*** Done with requ./AppServer: line 9: 31074 Killed

note how Thread-10, 12 and 13 got stuck.

i'm running SUSE linux. i'm wondering if this can be
in some way related to my use of a NOT threadsafe mysqldb
module. i plan to move soon the app to a new linux server
(it's SUSE too) with mysqldb compiled againt threadsafe
mysqlclient library. to my understanding to check if
mysqldb is using a threadsafe client lib at the python
prompt one has to type:

import _mysql
print _mysql.thread_safe()

a zero value stands for no, otherwise yes.

also, i'm not experiencing any lock-up on my win2k box,
where i develop most of the code (threadsafe mysqldb module ).

on both installations i'm using DbConnectionPool module,
by Written by Warren A. Smith to allows to use a pool of mysql connection in a more reliable way then standard webware dbpool
(it resumes a "closed" connection, useful when you have
a nasty firewal between webware and mysql).


i always return the connection to the pool since i've this
code on my SitePage class:

  def awake(self, transaction):
    Page.awake(self, transaction)

    # acquire DB connection from pool
    self._cnn = cm.connection

  def sleep(self, transaction):
    Page.sleep(self, transaction)

    # release DB connection to pool
    self._cnn.close()

i'm really puzzled since the lock-up seems act randomly both
in time and in the place (different servlets). next step is to
 replace DbConnectionPool  with webware with DbPool, since there isn't
any firewall between linux server and mysql (they are on the same
server).

any idea will be greatly appreciated.


cheers, deelan.



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to