Results 1 to 3 of 3

Thread: Querying the current "questions" value

  1. #1
    Registered
    Join Date
    Mar 2013
    Location
    Italy
    Posts
    2
    Rep Power
    0

    Querying the current "questions" value

    Since I often have to launch scripts that executes many manteinance queries on the db, sometimes it happens that I hit the max_questions value and the site goes offline (not good) until the questions counter reset.

    Dued to my ignorance, I wonder if there is any way to read the current questions value at run time via PHP, so that maybe I could exit the script if I reach let say the 80% of the max_questions limit, and I could be able to resume the script after 1 hour.

    Thank you

  2. #2
    Custom User Title tpoynton's Avatar
    Join Date
    Sep 2004
    Location
    Mass
    Posts
    2,181
    Rep Power
    18
    That would be cool if you could get the value, but I do not recall coming across a way to do that. Alternatively, you could schedule the maintenance scripts to run at off-peak times. If your site never has off-peak times, might be time to upgrade your hosting and/or try to find ways to reduce the # of queries.

  3. #3
    Registered
    Join Date
    Mar 2013
    Location
    Italy
    Posts
    2
    Rep Power
    0
    Thanks for replying.

    I'm pretty much okay with the current mysql limits, these maintenance scripts are more like exceptional tasks scripts, such as importing or exporting or deleting above average amount of data based on some criteria. Retriving the current questions would be an small aid for now until I'm able to upgrade the hosting.

Posting Permissions

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