Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
24.1 Legacy Series
»
Solved: php-cgi hogging 100% CPU
« previous
next »
Print
Pages: [
1
]
Author
Topic: Solved: php-cgi hogging 100% CPU (Read 1085 times)
trick77
Newbie
Posts: 5
Karma: 0
Solved: php-cgi hogging 100% CPU
«
on:
April 21, 2024, 09:29:13 am »
I had been experiencing an issue where the CPU usage spiked to 100% when accessing the OPNsense dashboard or navigating through the UI. When using the top command, I saw one or more php-cgi processes consuming close to 100% CPU and using up all available memory until they were terminated. This problem worsened over the past few weeks, and I found myself having to manually terminate the php-cgi processes frequently.
While exploring the file system, I stumbled upon the /var/lib/php/sessions directory and discovered I couldn't list its contents due to the sheer number of leftover PHP session files. These files were so abundant that they severely impacted PHP's session handling capabilities. I was unable to delete the files using rm * due to their volume. Ultimately, I had to remove the entire directory with rm -f /var/lib/php/sessions/ (it gets recreated automatically).
I traced the issue back to an unusually high value set for Session Timeout under System -> Settings -> Administration. I don't recall changing this setting to a value in the millions of minutes, it just makes no sense. I don't know how the default was changed, maybe during previous a config restore?
After deleting the session files and setting the timeout back to 240 minutes no more CPU hogging php-cgi processes!
I'm sharing this in case anyone else encounters a similar issue.
«
Last Edit: April 21, 2024, 09:35:11 am by trick77
»
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
24.1 Legacy Series
»
Solved: php-cgi hogging 100% CPU