Errors with php-fpm.

---As you described early - it may be memory issue (error 70), so make memory limit higher and wait 6-12 hours not our way, try to make memory limit lower and check will errors appear more often?
---are there any errors at system/apache logs at same time? maybe open-files limit? OOMkiller
---try to downgrade php from 7.3.27 to 7.3.25.
---try disable/enable opcache
 
---As you described early - it may be memory issue (error 70),
That was what I found on the internet that was stated as most error 70 cause. I doubted that because we've got 64 GB of memory in the server.
How/where would I be able to increase the memory limit for php-fpm? I have increased it from 128 to 512MB for several days in php73.ini but that did not change anything. Is that what you ment?

No as stated there are 0 apache logs at the same time.
Open_files_limit | 32343 according to Mariadb. Should be enough, correct?

I think I tried disabling opcache already without any result, but I can try that again, just to be sure.

As far as downgrading php, I'd rather not. Same issue on 7.3.26 so I don't expect 7.3.25 to be any better.

Thanks!
 
Open_files_limit | 32343 according to Mariadb. Should be enough, correct?
I don't know how many tables in DBs you have, also how many table_cache set. in most cases it is enough, i think your CPU will not serve something larger, and if it will not be enough - you will see errors in mysql log. in my case when i finish migration of 5-6 servers from xeon x5xxx series to dual xeon e5-2680v4 I must set openfiles limit for mysql to 360000.
also I'm using nginx_apache instead of single Apache. and normally at php-fpm log I see only messages about restarts in 300-3000 sec caused by pm.max_requests = 1000
[07-Feb-2021 17:21:28] NOTICE: [pool toyrewie] child 25286 exited with code 0 after 713.310263 seconds from start
[07-Feb-2021 17:21:28] NOTICE: [pool toyrewie] child 26149 started
[07-Feb-2021 17:21:57] NOTICE: [pool rdridow] child 23171 exited with code 0 after 2514.636321 seconds from start
[07-Feb-2021 17:21:57] NOTICE: [pool rdridow] child 26170 started
opcache keeps a lot of precompiled code, and makes php-fpm life easier, with revalidate freq 60s
try to set larger value
 

Attachments

  • 5646456.png
    5646456.png
    46.4 KB · Views: 116
On the other servers I also see the same thing you do, only exit code 0.
And mostly on this server too, only once a while it goes awole (or how it it called) and start throwing these exit 70's on several accounts.

We don't have that many tables in DB it's not that big a server.
try to set larger value
A large value of what, and where do I do that?

Where can I find such nice overview you have like in your screenshot?
 
you can configure opcache here: /usr/local/php73/lib/php.conf.d/10-directadmin.ini
check cache status by this script, just rename to .php extension and upload to any domain with needed phpVersion
 

Attachments

it's old script, you can google any with more graphs stats.
you can start from:
opcache.memory_consumption=512
opcache.interned_strings_buffer=24
opcache.max_accelerated_files=32000
opcache.revalidate_freq=60
after php restart give it from 20mins to 1h, usually it's enough to fill up about 80% of opcache an you will see what limits to change.
 
I just remembered I changed something for opcache before but did it here:
/usr/local/directadmin/custombuild/configure/opcache/opcache.ini
so this would be server-wide and the one you're pointing to is only for php73 correct?

I'll try for php-fpm73 first and now I got this before changing to your settings:
1612816617469.png



Thanks for the script, works nice. I don't mind about colors or graphs this is already great for me.
I'll post new results later on.
 
" so this would be server-wide and the one you're pointing to is only for php73 correct?"
yes, and it will be overwritten when php updated or confs rewrited, so You can use custom config at custombuild
 
Oke, if it works I might change it with the server-wide file. That should not get overwritten unless opcache has some update or is reinstalled if I'm not mistaken.

Oh wow, it really doesn't waste anything. :)

This is made just now:
1612821484405.png
 
you may set
768
32
48
--
that's will be enough, check server load too what was before you set it 512
 
Ehmz... no clue on what the server load was before I set it to 512.
I think around the same as now.

Code:
top - 23:06:13 up 3 days, 21:10,  1 user,  load average: 0.43, 0.30, 0.25
Tasks: 303 total,   2 running, 301 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.6 us,  0.5 sy,  0.0 ni, 98.6 id,  0.2 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem : 65714840 total, 39492288 free,  6846312 used, 19376240 buff/cache
KiB Swap: 33521660 total, 33521660 free,        0 used. 57793980 avail Mem

Does this drop server load? Because the other server (without issues) often has that load avarage over 1.08.

Is this correct:
opcache.revalidate_freq=60
set this back to 48?
 
That's odd. I just tried these settings on the other server, but then in the server wide opcache thing here:
/usr/local/directadmin/custombuild/configure/opcache/opcache.ini
and has totally no effect. So it seems I need to create some custom file of 10-directadmin.ini so it does not get overwritten. I will search on how to do this.

For reference purposes. Found it.
Have to create a 99-custom.ini in the same directory and only put the changed/adjusted values in there.
 
Last edited:
Until now I've only seen a lot of nothing and exit 0 entry's since [07-Feb-2021 22:11:01] which was the last time I restarted php-fpm.
These exit 70 and white screens happen very irregularly, but I hope the opcache change also helped.
Lets hope it keeps running fine now.

1612883026948.png

Hit-rate still 99,88% :)
 
@Zhenyapan Thanks for the above script. Something like this should be in DA.

I found this for the custom changes

Should work well if you need server wide.

@Richard G I hope this helps get around you php fpm woes.
 
Nice find @bdacus01 but I like the 99-custom.ini far better as a server wide solution.
You don't need a custom directory and you only have to put in the changes and you can use seperate settings for each php version.
 
No in the same directory as the 10-directadmin.ini.
That's here:
/usr/local/php7x/lib/php.conf.d/
where the x stands for the php version you want to use this for.

In the 99-custom.ini only place the things you want to change (look in the 10-directadmin.ini for present opcache settings). I did this and works perfectly. After restarting php-fpm.
And it won't be overwritten on a php update.
 
Back
Top