Hello,
on my osticket instance, that was working perfectly until now, there is now a strange and very bad problem.
If a user open a ticket on the public interface the page is stuck with the message "Wait, it will take a moment" (well, I see it in italian language) until php timeout occur, then an HTTP error 500 is shown.
The same is happening when I simply click on some tickets in the admin area, only on certain tickets! Some are opening correctly, other do the same behavior: php stuck at 100% cpu and webserver sluggish (due to cpu consumption), but then the browsers shows the ticket page till the "expiration date" field that is not compiled:
So maybe there is something with that field...?
Note: well php is using 50% cpu in reality as the VM has two virtual cpu, but you get the point.
I've done these trials, with no results:
- checked the php log, no relevant error.
- set registry level to DEBUG, no relevant entry in the log
- updated php (that was 8.1.5) to 8.2.9, same behavior
- updated osticket, that was 1.17.3 to 1.18, same behavior (update was successful however)
So I'm now lost. Is there a way to understand what's happening? Activate some sort of a verbose log to see what osticket is stuck on? It could be helpful for many other cases to know what to do in these cases.
Here a screenshot of system info:
FURTHER DIGGING...
So, I've continued to dig and I've found that the problem seems to be the SLA.
I've set the default SLA to nothing and, in the public area, the tickets are now opened without problem.
I've then found the place where the error happened in my php log with this line:
PHP Fatal error: Maximum execution time of 60 seconds exceeded in C:\inetpub\Sites\helpdesk.poliware.net\include\class.schedule.php on line 803
So I've checked that line (it's the $this->_current = clone $from; near the end):
function getCurrent($from=null) {
if (!isset($this->_current) || $from) {
// Figure out starting point (from)
$from = is_object($from) ? clone $from : Format::parseDateTime($from ?: 'now');
$start = $this->getStartsDatetime();
if ($start->getTimestamp() > $from->getTimestamp())
$from = clone $start;
// Check to make sure we're still in scope
$stop = $this->getStopsDatetime();
if ($stop && $stop->getTimestamp() < $from->getTimestamp())
return null;
// Figure out start time for the entry.
$from->modify($this->getIntervalSpec($from));
$this->_current = clone $from;
}
return $this->_current;
}
But here I don't know how to proceed.
Existing tickets still cannot be opened so I'm now trying to set them to no SLA from the database...
Ok, updated sla_id to 0 (that means "no sla") in the table os_ticket and now os ticket is back to life.
So it's most worth for you to fix this issue so that it will not happen to other people and to understand what happened.
I'll be happy to help you understand by checking what's useful for you.