KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Killing off query if table is down #1327

Closed ugakr opened this topic on on Mar 2, 2020 - 1 comments

ugakr commented on Mar 2, 2020

I have a database right now with a table that (apparently) can be stuck in a process where it is neither up or down, but cannot be called to or else it will hang. If this happens, the page loads forever and so does my entire host. I have to restart it to fix it and load all my other pages. Is there a way for me to have a timeout for query calls? Also, I am wondering when it hangs, is it the PHP sending info to the database or the database sending info (or the lack of it) that makes it hang? Obviously there are a bunch of timer solutions, but none of them seem to work and are made from before and after times -- where after can't happen. Thanks in advance.

ugakr commented on Mar 2, 2020

Fixed this by having a variable, complete, which is false before the query and true after. After the entire function I slept for x amount of seconds, and then check if complete is false; if it is, handle it however you like.

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
solved

None