• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • (Plesk for Windows):
    MySQL Connector/ODBC 3.51, 5.1, and 5.3 are no longer shipped with Plesk because they have reached end of life. MariaDB Connector/ODBC 64-bit 3.2.4 is now used instead.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Issue AH01071: Got error 'Unable to open primary script: ( Too many open files )

gdc

New Pleskian
Server operating system version
AlmaLinux 8.5
Plesk version and microupdate number
18.0.57 #2
I recently started having unexpected issues with my Plesk Obsidian based server running on AlmaLinux 8.5. The server had been up and running for over 180 days without issue with over 160 domains. The past three days it's started showing a white page, that says 'No input file specified' for one of the domains. I can refresh the page a couple of times and it'll eventually load, until you try to go to the next link or page, then the same thing happens. It'll log errors AH01071: Got Error 'Primary Script Unknown' and AH01071: Got Error 'Unable to open primary Script' /var/www/vhosts/domain_name/httpdocs/file.php ( Too many open files ). I can restart the server and it runs fine until about the same time the next day. The domain is running on PHP 7.4.33 as an FPM application under Apache. Any help or insight would be greatly appreciated. The server was runing 18.0.54, but I updated it to 18.0.57 #2 to see if it might resolve the issue. I ran the diagnosis and repair utility on the domain and it didn't find any issues.
 
You probably need to increase the number of allowed open files on your system. You can check the number of open files with
# lsof | wc -l

Increase the general maximum file descriptor value:
# vi /etc/sysctl.conf

Add/modify:
fs.file-max = 500000

Reload the system daemon:
# systemctl --system daemon-reload
# sysctl -p

# vi /etc/security/limits.conf
and add:

nginx soft nofile 500000
nginx hard nofile 500000
root soft nofile 500000
root hard nofile 500000
psaadm soft nofile 500000
psaadm hard nofile 500000
mysql soft nofile 500000
mysql hard nofile 500000
httpd soft nofile 500000
httpd hard nofile 500000

or instead fo 500000 another large number that fits your system.

It may be necessary to also configure max open file variables in some services, but you can first try it with the general settings.
 
You probably need to increase the number of allowed open files on your system. You can check the number of open files with
# lsof | wc -l

Increase the general maximum file descriptor value:
# vi /etc/sysctl.conf

Add/modify:
fs.file-max = 500000

Reload the system daemon:
# systemctl --system daemon-reload
# sysctl -p

# vi /etc/security/limits.conf
and add:

nginx soft nofile 500000
nginx hard nofile 500000
root soft nofile 500000
root hard nofile 500000
psaadm soft nofile 500000
psaadm hard nofile 500000
mysql soft nofile 500000
mysql hard nofile 500000
httpd soft nofile 500000
httpd hard nofile 500000

or instead fo 500000 another large number that fits your system.

It may be necessary to also configure max open file variables in some services, but you can first try it with the general settings.
Thanks for the suggestion, I'll give it a try. What I don't understand, is how the server can run for 6 months with no issues, then all of a sudden it won't run for more than a day without issues, now going on 4 days in a row, although nothing new has been added to the server.
 
Back
Top