Advertisement:

Author Topic: $db_persist causes error "too many files open"  (Read 1295 times)

Offline Ali_

  • Semi-Newbie
  • *
  • Posts: 62
$db_persist causes error "too many files open"
« on: April 07, 2019, 06:29:00 PM »
I've attempted to set the database persist option on my forum to ON, but when I browse to a specific page  (ADMIN >> THEMES AND LAYOUT >> MEMBER OPTIONS) it gives me this error:

Code: [Select]
Out of resources when opening file /var/tmp/#sql_56c9_0.MAI (Errcode 24 "Too many files open")
File:  /www/mysite/html/Sources/Themes.php
Line: 431

Note:  It appears that your database may require an upgrade.  Your forum's files are currently at version 2.0.15, while your database is version 2.0.  The above error might possibly go away if you execute the latest version of upgrade.php

I looked at that line of code on Themes.php, and all there is on that line is:
Code: [Select]
'custom_fields' => empty($customFields) ? array() : $customFields,
I am not sure what to do, should I not be using the $db_persist option in Settings.php ?  I thought this was supposed to help with performance as it suggests in the help field.  Am I supposed to upgrade my database?  I upgraded things following the documentation, and things went smoothly.  I just never used $db_persist before.

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,622
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: $db_persist causes error "too many files open"
« Reply #1 on: April 07, 2019, 07:07:24 PM »
I don't suggest using that feature.
Too many files open means you have increase your files limit on linux for mysql and maybe the whole server.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline Ali_

  • Semi-Newbie
  • *
  • Posts: 62
Re: $db_persist causes error "too many files open"
« Reply #2 on: April 07, 2019, 07:13:19 PM »
It's a dedicated MySQL server, I can change the MySQL conf and scale the server up if I need it.  Not that I want that.

What's the purpose of the feature? Didn't think it would cause errors instead of increasing performance.


Offline Ali_

  • Semi-Newbie
  • *
  • Posts: 62
Re: $db_persist causes error "too many files open"
« Reply #4 on: April 07, 2019, 08:01:59 PM »
@vbgamer45 thanks :)

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,829
    • StoryBB/StoryBB on GitHub
Re: $db_persist causes error "too many files open"
« Reply #5 on: April 08, 2019, 02:16:21 AM »
What kind of performance issues are you having?

And no, for typical loads it almost certainly won’t help. Used to be more relevant a long time ago but the relevant things have changed so dramatically in the intervening years.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.