invalid json response after sitting 7 min
invalid json response after sitting 7 min

I noticed that after sitting for approximately 7 min, when I go to work in the page with datatable (the source are editor files in php which is against ms sql) I get an json response. I started to look at the server settings where it's hosted, and I see this value:
session.gc_maxlifetime = 1440
Any suggestions on what I should look at or contact the hosting provider to ask?
Answers
I was wrong, it's a little over 5 min
If you're having trouble with it, use SO, for example.
https://stackoverflow.com/questions/75622923/in-php-session-is-default-for-1440second-24-min-so-if-user-is-active-then-also
Before I start a session I run this code for example. To make a couple of changes without having to edit the php.ini file on the server.
If you are needing to wait for seconds, never mind minutes I'd very much recommend you consider enabling server-side processing.
How big is your data set that it times out over 5 minutes?
Allan
I apologize for the confusion. The data takes several seconds to load & I can work just fine. But if I leave it idle for approximately 5 minutes, when I go to do anything after the 5 minutes I get the invalid json. DevTools is opened but everything looks blank so I am assuming there is some sort of idle timeout that I would like to expand but I am not sure where to look.
However, I would like to look at shifting the execution to server site. But paging did not work when I set server: to and I didn't see an easy solution. I am licensed for editor.
When server side processing is enabled the server script needs to support the Server Side Processing Protocol. This blog discusses using the Editor supplied server side libraries for server side processing. Maybe you can use the PHP server side library. Otherwise you will need to build your own support for server side paging, searching and sorting.
Sorry I'm not familiar with PHP to help with the timeout issues.
Kevin
Sorry, I totally misunderstood!
What is the server sending back if it isn't valid JSON? I expect there will either be an error message or it will be empty?
Allan
Have you tried my recommendation above? That should fix the problem. Please also check whether you set a faulty logout timeout at the client side with JS. That could be the other cause of this.
@allan , no worries. I have devtools open when this happens and when I inspect, everything is empty / clear.
@rf1234 , I did add the php code to the top of the page/php.
If it is clear, then that is why you are getting a JSON error - an empty string is not a valid JSON object. The question then becomes why the server is responding with an empty string.
Are there any error messages in the PHP error log for your server? Do you have an early exit if a session or login doesn't exist? You could add some debug code into there to confirm if that is the path that the code is taking.
Allan