Link to home
Start Free TrialLog in
Avatar of Eduardo Fuerte
Eduardo FuerteFlag for Brazil

asked on

Could you point the better manner on extend a timeout in PHP?

Hi Experts


Could you point the better manner on extend a timeout in PHP?

My sessions timing out too quickly.

Thanks in advance.
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Standard Session timeout is 24 minutes of Inactivity.  Are you letting your users do nothing for more than 24 minutes?
Avatar of Eduardo Fuerte

ASKER

Hi Dave

We are talking just now about it's already a long time.
But specifically in our case:

A dashboard is presented in a large TV with a lot of graphs for the people to make decisions. This dashboard must to be ON for an ininterrupted time.

So, reformulating the question: is it possible a no timeout session ?  if it isn't what is the maximum timeout session?
SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
So, how to deal to mantain the correct data always presented in dashboard?

In our case a session expiration was seen. The values presented in dashboard are out of date.

After a "F5" the correct values appears.
To keep the data up to date, you need to use JavaScript and AJAX to periodically fetch and refresh the data similar to what Facebook does.  This means rewriting the page to use a different method.
Hi

We are still using these resources.

The data to be presented is first obtained by via a stored procedure. This sp delays more than 30 sec to run, I gess something between PHP and MySQL (or something else) is avoiding the data to be presented due the delay.
Correction:
to be presented  = to be actualized
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi Slick812

Since a long time we doidn't interact!

Thank you for so elaborated reply.

I'm really confuse with this situation and need some extra guidance.

What I heard here is: if MySQL is to much busy and couldn't generate all the replies necessary to be presented for the PHP view after 10 secs it enters in "timeout" so nothing is presented. Then MySQL waits for 30 secs to start trying to process and give the data to be presented by the PHP view.

Does it make sense?

(The SP after some index creations became to be faster but it doesn't run in less than 20 secs)

Accordingly to your and Dave's replies - this facts have no connection with PHP session time out.
Hi Eduardo,

If you have a big dashboard on a large TV where you are constantly trying to keep data up to date, I wonder if using web sockets would be a good fit here https://www.html5rocks.com/en/tutorials/websockets/basics/
Hi Scott

Thank you for the interaction. Possibly it could considered in the future.

The app is under prodution and we need to give a  quickly solution.

What we already start is another SP that could sumarize data in a table  this SP will be started in a  SPOON bat process (from a minute to minute)  so, outside the process.

The actual SP (called by PHP) will use this sumarized data and will be very fast.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi

Very good and instructive considerations, that makes all sense. I carefully read what you have published. The information I had at my companymust have some kind of misconceptions.

I agree that the key here is to optimize as much as I could SELECT.

The query does 04 FULL SCAN (s) and I asked here another question specifically about how it could be optimized in:

Https://www.experts-exchange.com/questions/29049727/Could-you-point-how-can-I-avoid-a-full-table-scan-on-this-mysql-query.html

So, I think the runtime can decrease significantly.

Could you give a look?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry the delay.
I was transfered to another activity. First I passed an approach on what you said, it was very well considered.
Thank you for participation and patience!