Perl CGI CPU usage very high over last couple of months - how to troubleshoot

outofcontrol

Active Member
May 18, 2009
37
3
58
Montreal
We have a series of ancient CGI scripts (behind members firewall). Until the last month or so, we never had an issue with these scripts. Now, on a regular basis the scripts appear to get stuck and hog up the cpu, using more and more PIDs. The scripts still seem to be doing what they should, but sometimes get stuck. The scripts that do get stuck are involved in file uploads via a form, in case that might help diagnose the issue.

Given the age of our scripts, I can possibly assume something in our scripts are not ending nicely and hanging on?

Questions:
- Does anyone know if a change was made recently that might cause this?
- Can any one suggest a way to troubleshoot these scripts. Perl is not a strength, but I can understand most of the code.
- Is there a way to update all the Perl modules on the server in one go, or only one by one?
- Many of the modules are failing to upgrade with this error: "cpanminus failed with non-zero exit status: 1"
 

cPanelAnthony

Administrator
Staff member
Oct 18, 2021
1,041
112
118
Houston, TX
cPanel Access Level
Root Administrator
Hello! There wouldn't be any cPanel-side change or update that would increase load. In regards to your specific server, we can't say without access. I don't have any suggestions for actually troubleshooting the code of a script, but this article can help with load investigations.

How to diagnose high server loads

There wouldn't be a way to automatically update all modules, but this document might help.


For the last question, we would need more output than that. There are likely other error messages in there; are there any other error messages in the output?
 

outofcontrol

Active Member
May 18, 2009
37
3
58
Montreal
Thank you for the information, I will take a look and see if I can figure this out.

Complete error message from page when trying to upgrade, for example, Charts:

```
Checking C compiler....C compiler (/usr/bin/gcc) OK (cached Wed Nov 17 08:47:29 2021)
Tuned C compiler not available because it is not enabled....Done
Method: Using cpanminus
cpanminus failed with non-zero exit status: 1

All available perl module install methods have failed
```