• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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