XF 2.2 Fatal error on style install

Stiff

New member
I am a newbie, so please don't get too code-ish on me. I seem to need coding evaluation, but with English explanation.

On installing a new style, I get a fatal error. This is the first add-on of any type that I am installing, so all I have is generic Xenforo. I have consulted with the designer of the style. S/he believes it to be an error that needs to be corrected at the host.

My question:
Any ideas what the problem is and what I can ask my host (Siteground) to correct?

My style designer has isolated these lines as being key:

Warning: include(/home/customer/www/XXXXX.com/public_html/community/src/XF/Util/Php.php): failed to open stream: Too many open files in /home/customer/www/XXXXX.com/public_html/community/src/vendor/composer/ClassLoader.php on line 480

Warning: include(): Failed opening '/home/customer/www/XXXXX.com/public_html/community/src/vendor/composer/../../../src/XF/Util/Php.php' for inclusion (include_path='.:/usr/local/php74/pear') in /home/customer/www/XXXXX.com/public_html/community/src/vendor/composer/ClassLoader.php on line 480

Warning: include(/home/customer/www/XXXXX.com/public_html/community/src/XF/Util/Php.php): failed to open stream: Too many open files in /home/customer/www/XXXXX.com/public_html/community/src/vendor/composer/ClassLoader.php on line 480

Warning: include(): Failed opening '/home/customer/www/XXXXX.com/public_html/community/src/vendor/composer/../../../src/XF/Util/Php.php' for inclusion (include_path='.:/usr/local/php74/pear') in /home/customer/www/XXXXX.com/public_html/community/src/vendor/composer/ClassLoader.php on line 480

Fatal error: Uncaught Error: Class 'XF\Util\Php' not found in /home/customer/www/XXXXX.com/public_html/community/src/XF.php:144 Stack trace: #0 /home/customer/www/XXXXX.com/public_html/community/src/vendor/composer/ClassLoader.php(480): XF::handlePhpError(2, 'include(/home/c...', '/home/customer/...', 480, Array) #1 /home/customer/www/XXXXX.com/public_html/community/src/vendor/composer/ClassLoader.php(480): include() #2 /home/customer/www/XXXXX.com/public_html/community/src/vendor/composer/ClassLoader.php(346): Composer\Autoload\includeFile('/home/customer/...') #3 [internal function]: Composer\Autoload\ClassLoader->loadClass('XF\\Error') #4 /home/customer/www/XXXXX.com/public_html/community/src/XF/App.php(983): spl_autoload_call('XF\\Error') #5 /home/customer/www/XXXXX.com/public_html/community/src/XF/Container.php(30): XF\App->XF\{closure}(Object(XF\Container)) #6 /home/customer/www/XXXXX.com/public_html/community/src/XF/App.php(2690): XF\Container->offsetGet('erro in /home/customer/www/XXXXX.com/public_html/community/src/XF.php on line 144
 

Brogan

XenForo moderator
Staff member
It is a server issue due to limits imposed by the host/server settings: Too many open files .

Contact your host and ask them to increase the limit.
 

Brogan

XenForo moderator
Staff member
Which host are you with?

In general, there shouldn't be any issues running XF on even basic shared hosting.

When hosts start to apply arbitrary/low limits such as this, or disabling functions, I typically recommend finding a new host.
 

Stiff

New member
Did you get any joy with this? I have the same issue (siteground)
It worked out just fine. I've always had great luck with SiteGround (I've used them for years) because they have 24/7 chat and I've hardly ever even had to wait. Their instructions were so easy to follow on the xf install. The tech made some adjustment or other, quick quick.
However, I did decide not to add a 3rd party style for my board at the moment. I'm new to setting up a board, don't code, and decided that was an unnecessary complication. I've stuck with a child of xf default. I'm very pleased with how it's turning out.

NB PixelEdit was super nice about getting me backed out of the error when I tried to load their style.
 

mrb1972

Active member
It worked out just fine. I've always had great luck with SiteGround (I've used them for years) because they have 24/7 chat and I've hardly ever even had to wait. Their instructions were so easy to follow on the xf install. The tech made some adjustment or other, quick quick.
However, I did decide not to add a 3rd party style for my board at the moment. I'm new to setting up a board, don't code, and decided that was an unnecessary complication. I've stuck with a child of xf default. I'm very pleased with how it's turning out.

NB PixelEdit was super nice about getting me backed out of the error when I tried to load their style.

Thanks for the update, I got mine sorted too, I had to turn off their ultrafast PHP settings and go back to Standard PHP, that has fixed my problem so far!! fingers crossed
 

oO5 Dynasty

Well-known member
Just checking to see if there is anything that can be done from xenforo, before I just give up on this.
I contacted My web hosting provider, and this is what they said.

We reviewed the case and noticed that the Too many open files error was recorded in the server error logs and for the user.oo5dynasty.com site:

2021-12-08 08:42:19.030644 [Wed Dec 08 08:42:19.030588 2021] [:error] [pid 47602] [client 159.196.171.50:40854] PHP Fatal error: Uncaught ErrorException: [E_WARNING] Unknown: failed to open stream: Too many open files in Unknown:0, referer: https://user.oo5dynasty.com/admin.php?styles/import


This error suggests that the import process you are carrying out generates far too many files which does not close and exceed server set limitations. Note that this is a standard limit on shared servers which cannot be increased further in order to ensure that all users of the shared server have equal access to its resources and that they are no overused.

Our suggestion for you is to look into alternative methods for importing the new theme content or check with the theme providers or the application developer if the import process cannot be optimized, so that less files are opened at the same time.

The only other alternative we can offer you is to consider our Cloud solutions where that limit can be increased, however, we need to know the number of files that will have to stay opened when the server is upgraded and if the limit is to be increased. Information on how to upgrade to Cloud is also available in our article on the subject:

How do I upgrade my hosting plan?

Let us know if we can be of any other assistance by opening a new support request.

Best regards,

Mihail Mihaylov
Senior Technical Support Team
 
Top