Results 1 to 6 of 6

Thread: Persistent, non-persistent or idle-closing MySQL connection?

Threaded View

  1. #1

    Thread Starter
    Frenzied Member TheBigB's Avatar
    Join Date
    Mar 2006
    Location
    *Stack Trace*
    Posts
    1,511

    Persistent, non-persistent or idle-closing MySQL connection?

    Hi,

    I have this application that can produce up to 100 queries per minute, but most of the times is idle.
    It seems to me that reopening the connection for each query is rather inefficient, so I'm inclined to use a persistent connection.

    But suppose the application would be used on a bigger scale.
    Won't the server at a certain point overflow with all the persistent connections?

    Would it be an idea to use some sort of idle monitor that detects inactivity and closes the connection?
    What would be the best design for such a thing be?
    I was thinking the query handler could set a timestamp for the last execution and a timer or a background thread would check whether a certain time passed every few seconds.

    Suggestions?

    Thanks
    Last edited by TheBigB; Apr 5th, 2011 at 03:07 PM.
    Delete it. They just clutter threads anyway.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width