[ 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
Know my way around
Posts: 242
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 » Fri Dec 13, 2019 7:49 am

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-651
CPU: Intel(R) Celeron(R) CPU J1800 @ 2.41GHz
Firmware version: 4.3.5.0760(20181114)
Volumes: EXT4, Encrypted volume

User avatar
QNAP_Stephane
Experience counts
Posts: 3841
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 » Thu Dec 19, 2019 5:57 pm

updated
--------------------------------------------------------------------------
QnapClub AppCenter - https://www.qnapclub.eu
--------------------------------------------------------------------------

raidforsaving
Know my way around
Posts: 242
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 » Fri Dec 20, 2019 10:36 pm

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-651
CPU: Intel(R) Celeron(R) CPU J1800 @ 2.41GHz
Firmware version: 4.3.5.0760(20181114)
Volumes: EXT4, Encrypted volume

jjvdgeer
Starting out
Posts: 34
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 » Thu Feb 13, 2020 6:05 am

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: 3841
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 » Thu Feb 13, 2020 7:08 am

normal
disable this extension in php.ini
--------------------------------------------------------------------------
QnapClub AppCenter - https://www.qnapclub.eu
--------------------------------------------------------------------------

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 » Sun Mar 15, 2020 7:04 pm

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 » Sun Jul 05, 2020 9:18 am

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: 3841
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 » Sun Jul 05, 2020 4:54 pm

Intl ext are Embedded to qapache and apache7x solutions

Envoyé de mon MI 9 en utilisant Tapatalk

--------------------------------------------------------------------------
QnapClub AppCenter - https://www.qnapclub.eu
--------------------------------------------------------------------------

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 » Sun Jul 05, 2020 6:43 pm

Ok, will give it another try. Thank you for your support

Post Reply

Return to “Community Apps”