No Disconnect from MySQL? -> Server hangs

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • voets
    New Member
    • Oct 2001
    • 2

    No Disconnect from MySQL? -> Server hangs

    Last few days I got several emails from visitors of my website that told me they got a failure notice when trying to view database generated pages.

    When digging in to this problem I saw 256 instances of mysqld running on the webserver. Manual login was refused with an error message: "ERROR 1135: no more threads ..."

    What has this got to do with vbulletin?

    Some experimenting indicates vbulletin is the cause of this problem. Doing: ps awux | grep mysqld | wc
    tells me the number of mysql threads running at a moment.
    This number will increase steadily with each Thread Page in vbulletin that I view.

    I had a quick look in the sourc code but could not easily see any disconnect being done from the database. There is only a connect method in the db_mysql class.

    Has anyone experienced this same problem? Where is the disconnect being done? Are you relying on php to clean up connections?
    The system has php 4.0 installed
  • voets
    New Member
    • Oct 2001
    • 2

    #2
    After another good look at the source code I found the problem.
    The DB class of vblite is doing a pconnect() to the database.
    Somehow these persistent conenctions are not being re-used on our webserver resulting in the numerous mysqld threads on the system. In comnination with a large time-Out set in MySQL for connections, this behaviour put too much load on the server.

    After changing the pconnect() to a normal connect() to MySQL the problem disappeared

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...