[ QApache 2.4.39 + PHP 7.2.29 ] WebServer with PHP and PECL

This is the best place for community developers to publish their genius work. Your Apps enrich the QNAP Turbo NAS.
Post Reply
raidforsaving
Easy as a breeze
Posts: 279
Joined: Mon Jul 14, 2014 9:14 am

Re: [ QApache 2.4.39 + PHP 7.2.21 ] WebServer with PHP and PECL

Post by raidforsaving »

utamagashi wrote: Sun Dec 01, 2019 7:31 pm I had the same problem, so I did the following:

-> limit the memory usage with using another Multi-Processing Module in /opt/Qapache/etc/httpd.conf:

comment:
#LoadModule mpm_event_module libexec/mod_mpm_event.so

uncomment:
LoadModule mpm_prefork_module libexec/mod_mpm_prefork.so
Include etc/extra/httpd-mpm.conf


good luck
Thanks for helping on this utamagashi! :D There is a memory leak coming from nextcloud qpkg for years, and I'm hoping someone like you can help squash it. I have my instance fairly well protected, and usage is light. So, hoping this does the trick.
Model name: TS-653D
Firmware version: 4.5.3.1697 build 20210611
Volumes: EXT4, Encrypted volume
Previous: TS-651 dead by CPU bug
User avatar
QNAP_Stephane
Experience counts
Posts: 4802
Joined: Wed Mar 27, 2013 1:00 am

Re: [ QApache 2.4.39 + PHP 7.2.26 ] WebServer with PHP and PECL

Post by QNAP_Stephane »

updated
---------------------------------------------------------------------------------------------------------------------------

Find all QPKG in the MyQnap.org repository https://www.myqnap.org
join our discord server for any inquiry related to qpkg - https://discord.gg/4fPxHSWKQW

----------------------------------------------------------------------------------------------------------------------------
raidforsaving
Easy as a breeze
Posts: 279
Joined: Mon Jul 14, 2014 9:14 am

Re: [ QApache 2.4.39 + PHP 7.2.26 ] WebServer with PHP and PECL

Post by raidforsaving »

FYI, for anyone having memory leak issues, I found the following change fixed it for me. I'm usinq QApache 2.4.39 and Nextcloud 16 (non-qpkg). My Qapache is only for Nextcloud, and I have a small personal instance only used for file storage.

UPDATE: I've had a different type of halt in my web service. I"m troubleshooting what values will work best. If you have ideas please let me know. The defaults are not acceptable.

Proof of memory leak and fix in place:
https://i.imgur.com/MDpMS2I.png

In my Nextcloud/httpd.conf I edited the following section at the bottom.

I lowered many of the values.

Original config:

Code: Select all

# event MPM
# StartServers: initial number of server processes to start
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestWorkers: maximum number of worker threads
# MaxConnectionsPerChild: maximum number of connections a server process serves
#                         before terminating
<IfModule mpm_event_module>
    StartServers             3
    MinSpareThreads         75
    MaxSpareThreads        250
    ThreadsPerChild         25
    MaxRequestWorkers      400
    MaxConnectionsPerChild   0
</IfModule>
New config 1 - led to app error - AH00484: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting

Code: Select all

<IfModule mpm_event_module>
    StartServers             2
    MinSpareThreads         10
    MaxSpareThreads        25
    ThreadsPerChild         15
    MaxRequestWorkers      30
    MaxConnectionsPerChild   50
</IfModule>
New config 2:

Code: Select all

<IfModule mpm_event_module>
    StartServers              2
    MinSpareThreads          30
    MaxSpareThreads         100
    ThreadsPerChild          15
    MaxRequestWorkers       120
    MaxConnectionsPerChild   50
</IfModule>
Model name: TS-653D
Firmware version: 4.5.3.1697 build 20210611
Volumes: EXT4, Encrypted volume
Previous: TS-651 dead by CPU bug
jjvdgeer
Starting out
Posts: 48
Joined: Sat Oct 11, 2008 12:41 am

Re: [ QApache 2.4.39 + PHP 7.2.26 ] WebServer with PHP and PECL

Post by jjvdgeer »

I have a TS-431P2 with QTS 4.1.1.1146 with QApache V2439.7218.

I use it mainly for Nextcloud where I see a lot of errors in the logfile:
PHP Startup: Unable to load dynamic library 'xmldiff.so' (tried: /opt/Qapache/lib/extensions/no-debug-zts-20170718/xmldiff.so (/opt/Qapache/lib/extensions/no-debug-zts-20170718/xmldiff.so: cannot open shared object file: No such file or directory), /opt/Qapache/lib/extensions/no-debug-zts-20170718/xmldiff.so.so (/opt/Qapache/lib/extensions/no-debug-zts-20170718/xmldiff.so.so: cannot open shared object file: No such file or directory)) at Unknown#0
I also noticed that when I try to run some Nextcloud-occ-commands I get similar warnings (not errors). These seem related to running php. I also get them when just running 'php --version', like this:
[/] # /share/CACHEDEV1_DATA/.qpkg/Qapache/bin/php --version
PHP Warning: PHP Startup: Unable to load dynamic library 'gnupg.so' (tried: /opt/Qapache/lib/extensions/no-debug-zts-20170718/gnupg.so (/opt/Qapache/lib/extensions/no-debug-zts-20170718/gnupg.so: cannot open shared object file: No such file or directory), /opt/Qapache/lib/extensions/no-debug-zts-20170718/gnupg.so.so (/opt/Qapache/lib/extensions/no-debug-zts-20170718/gnupg.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'gender.so' (tried: /opt/Qapache/lib/extensions/no-debug-zts-20170718/gender.so (/opt/Qapache/lib/extensions/no-debug-zts-20170718/gender.so: cannot open shared object file: No such file or directory), /opt/Qapache/lib/extensions/no-debug-zts-20170718/gender.so.so (/opt/Qapache/lib/extensions/no-debug-zts-20170718/gender.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'protobuf.so' (tried: /opt/Qapache/lib/extensions/no-debug-zts-20170718/protobuf.so (/opt/Qapache/lib/extensions/no-debug-zts-20170718/protobuf.so: cannot open shared object file: No such file or directory), /opt/Qapache/lib/extensions/no-debug-zts-20170718/protobuf.so.so (/opt/Qapache/lib/extensions/no-debug-zts-20170718/protobuf.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning: Module 'rar' already loaded in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'seaslog.so' (tried: /opt/Qapache/lib/extensions/no-debug-zts-20170718/seaslog.so (/opt/Qapache/lib/extensions/no-debug-zts-20170718/seaslog.so: cannot open shared object file: No such file or directory), /opt/Qapache/lib/extensions/no-debug-zts-20170718/seaslog.so.so (/opt/Qapache/lib/extensions/no-debug-zts-20170718/seaslog.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'taint.so' (tried: /opt/Qapache/lib/extensions/no-debug-zts-20170718/taint.so (/opt/Qapache/lib/extensions/no-debug-zts-20170718/taint.so: cannot open shared object file: No such file or directory), /opt/Qapache/lib/extensions/no-debug-zts-20170718/taint.so.so (/opt/Qapache/lib/extensions/no-debug-zts-20170718/taint.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'xmldiff.so' (tried: /opt/Qapache/lib/extensions/no-debug-zts-20170718/xmldiff.so (/opt/Qapache/lib/extensions/no-debug-zts-20170718/xmldiff.so: cannot open shared object file: No such file or directory), /opt/Qapache/lib/extensions/no-debug-zts-20170718/xmldiff.so.so (/opt/Qapache/lib/extensions/no-debug-zts-20170718/xmldiff.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP 7.2.18 (cli) (built: May 8 2019 11:42:07) ( ZTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Xdebug v2.6.1, Copyright (c) 2002-2018, by Derick Rethans
Do others get this as well? Is it normal? Should it be fixed, and if so, how?
User avatar
QNAP_Stephane
Experience counts
Posts: 4802
Joined: Wed Mar 27, 2013 1:00 am

Re: [ QApache 2.4.39 + PHP 7.2.26 ] WebServer with PHP and PECL

Post by QNAP_Stephane »

normal
disable this extension in php.ini
---------------------------------------------------------------------------------------------------------------------------

Find all QPKG in the MyQnap.org repository https://www.myqnap.org
join our discord server for any inquiry related to qpkg - https://discord.gg/4fPxHSWKQW

----------------------------------------------------------------------------------------------------------------------------
utamagashi
New here
Posts: 5
Joined: Sun Apr 19, 2015 8:05 pm

Re: [ QApache 2.4.39 + PHP 7.2.26 ] WebServer with PHP and PECL

Post by utamagashi »

Hi Stephane
Could you please update PHP to Version 7.2.28?
Unfortunately I can't use the Apache74 Package (https://qnapclub.eu/en/qpkg/835) because of the following error:
http://forum.qnapclub.fr/topic/10910-ap ... ment=45173
blablub233
New here
Posts: 5
Joined: Sun Jul 05, 2020 4:10 am

Re: [ QApache 2.4.39 + PHP 7.2.29 ] WebServer with PHP and PECL

Post by blablub233 »

Hi Stephane,

could you please add php module intl.so?
It's needed for installations such as owncloud and nextcloud. There are some users around having the same issues.
I tried a lot of things. Even through Entware and Qapache I couldn't get it to work.

QNAP Modellname TS-453Be
Firmware-Version 4.4.3.1354 Build 20200702
User avatar
QNAP_Stephane
Experience counts
Posts: 4802
Joined: Wed Mar 27, 2013 1:00 am

Re: [ QApache 2.4.39 + PHP 7.2.29 ] WebServer with PHP and PECL

Post by QNAP_Stephane »

Intl ext are Embedded to qapache and apache7x solutions

Envoyé de mon MI 9 en utilisant Tapatalk

---------------------------------------------------------------------------------------------------------------------------

Find all QPKG in the MyQnap.org repository https://www.myqnap.org
join our discord server for any inquiry related to qpkg - https://discord.gg/4fPxHSWKQW

----------------------------------------------------------------------------------------------------------------------------
blablub233
New here
Posts: 5
Joined: Sun Jul 05, 2020 4:10 am

Re: [ QApache 2.4.39 + PHP 7.2.29 ] WebServer with PHP and PECL

Post by blablub233 »

Ok, will give it another try. Thank you for your support
innerd
New here
Posts: 5
Joined: Mon Aug 10, 2020 5:59 pm

Re: [ QApache 2.4.39 + PHP 7.2.29 ] WebServer with PHP and PECL

Post by innerd »

Hi, is there an arm version? I cant find it on qnapclub.eu
User avatar
Toxic17
Ask me anything
Posts: 6477
Joined: Tue Jan 25, 2011 11:41 pm
Location: Planet Earth
Contact:

Re: [ QApache 2.4.39 + PHP 7.2.29 ] WebServer with PHP and PECL

Post by Toxic17 »

innerd wrote: Fri Feb 11, 2022 2:36 am Hi, is there an arm version? I cant find it on qnapclub.eu
I suggest you move to a newer php version as this one hasn't been updated for near 2 years.

Apache & PHP 7.3.X
Apache & PHP 7.4.X
Apache & PHP 8.0.X
Apache & PHP 8.1.X

all have ARM versions and available from qnapclub.eu

you may need to purchase the app, just for €5 or €10 thats cheap for what Stephane has done for the community. if you dont want to pay, then compile your own apache and php, both are free to download.
Regards Simon

Qnap Downloads
MyQNap.Org Repository
Submit a ticket • QNAP Helpdesk
QNAP Tutorials, User Manuals, FAQs, Downloads, Wiki
When you ask a question, please include the following


NAS: TS-673A QuTS hero h5.1.2.2534 • TS-121 4.3.3.2420 • APC Back-UPS ES 700G
Network: VM Hub3: 500/50 • UniFi UDM Pro: 3.2.9 • UniFi Network Controller: 8.0.28
USW-Aggregation: 6.6.61 • US-16-150W: 6.6.61 • 2x USW Mini Flex 2.0.0 • UniFi AC Pro 6.6.62 • UniFi U6-LR 6.6.62
UniFi Protect: 2.11.21/8TB Skyhawk AI • 3x G3 Instants: 4.69.55 • UniFi G3 Flex: 4.69.55 • UniFi G5 Flex: 4.69.55
Gosse
New here
Posts: 2
Joined: Wed Dec 15, 2010 5:27 am

Re: [ QApache 2.4.39 + PHP 7.2.29 ] WebServer with PHP and PECL

Post by Gosse »

Hi all,

Does someone perhaps still have an older version for x86 only? The x86-64 version is not compatible with my SS-439 running QTS 4.2.6 ....

Thanks already!
Post Reply

Return to “Community Apps”