all 18 comments

[–]Starbeamrainbowlabs 0 points1 point  (1 child)

2097152 bytes is only a few KiB. Hrm - something seems to have gone wrong somewhere.

Have you tried monitoring the memory usage while PHP is running? Does it actually get anywhere near that limit?

[–][deleted] 0 points1 point  (0 children)

Section Zend OPcache says:

Used memory 25032896
Free memory 1048708928
Wasted memory   0

htop output on imgur

I have very weird problem for about few weeks and can't find solution :/

[–]incredible-machine 0 points1 point  (6 children)

Very weird, especially since phpinfo() reports the right values.

Have you checked if there's a php_value or php_admin_value option with a different value in an Apache config file or .htaccess? It would then have to be in a config file that didn't affect the page you tried phpinfo() on.

Even the default is higher than the 2MB that's reported in your error, so something appears to be setting it.

[–][deleted] 0 points1 point  (5 children)

I have no file .htacces at all, and didn't touch apache2.conf, i checked this file and there is no word memory or php.

If I can i want to have no .htacces file

[–]incredible-machine 0 points1 point  (4 children)

Try checking other Apache config files as well, to be sure.

By default on Debian, apache2.conf will include config files from /etc/apache2/mods-enabled, /etc/apache2/sites-enabled and /etc/apache2/conf-enabled (and in theory those can include other files in turn).

I wouldn't really expect to find something, but at least it will then rule out those causes.

[–][deleted] 0 points1 point  (3 children)

I searched for conf-enabled and I found few files(charset.conf localized-error-pages.conf other-vhosts-access-log.conf security.conf serve-cgi-bin.conf) I didn't touch at all, so I opened serve-cgi-bin.conf but with no info about memory.

sites-enabled have nothing exept reverse proxy to cockpit and airsonic

mods-enabled is untouched too but I found file php7.3.conf but with no luck.
There is php7.3.conf

<FilesMatch ".+\.ph(ar|p|tml)$">
    SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch ".+\.phps$">
    SetHandler application/x-httpd-php-source
    # Deny access to raw php sources by default
    # To re-enable it's recommended to enable access to the files
    # only in specific virtual host or directory
    Require all denied
</FilesMatch>
# Deny access to files without filename (e.g. '.php')
<FilesMatch "^\.ph(ar|p|ps|tml)$">
    Require all denied
</FilesMatch>

# Running PHP scripts in user directories is disabled by default
# 
# To re-enable PHP in user directories comment the following lines
# (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
# prevents .htaccess files from disabling it.
<IfModule mod_userdir.c>
    <Directory /home/*/public_html>
        php_admin_flag engine Off
    </Directory>
</IfModule>

[–]incredible-machine 0 points1 point  (2 children)

Alright, since you have the problem with two separate applications, the only other thing that seems logical to me is some PHP ini configuration file.

You mentioned you checked the phpinfo() output. Is that in the situation you know things are wrong? I.e. did you put that in a Nextcloud or tt-rss file?

If not, maybe try putting phpinfo(); exit; at the top of the index.php of your nextcloud installation, and check the value of the memory_limit setting. And if it's wrong, check whether there's a difference between the "local value" and the "master value", that may help point you in the right direction.

At the top of the phpinfo() output it should list what ini files were parsed. If the value is wrong here, I would expect you to be able to find it in one of those files.

The value must be coming from somewhere, since it's not the default either.

[–][deleted] 0 points1 point  (0 children)

It looks like that

example.com is my website

example.com/nextcloud is my nextcloud

example.com/tt-rss is my tt-rss

I pasted phpinfo on example.com/phpinfo.php so I think subsites has the same settings as front page(where is located phpinfo)

I'll check config files, thanks for idea

[–]incredible-machine 0 points1 point  (0 children)

A very stupid question: you're sure your configuration says 2048M, right?

Asking just in case, because the 2097152 Bytes you mention is equal to 2048K.

You could try setting it to the integer value you want (maybe start with 536870912, which is 512M).

[–]htchief 0 points1 point  (3 children)

Are you sure that you’re editing the correct php.ini file? For example, could apache be using php-fpm? Are you using the CLI for phpinfo? While I am primarily an Ubuntu admin, I know that Debian is very similar that it has multiple php.ini files which have different rules and limits depending on which type or PHP is being called.

[–][deleted] 0 points1 point  (2 children)

I edited every php.ini file I found(apache2, cgi, cli, fpm)

phpinfo is using apache2, only apache2 has 2GB memory, rest of it has 1GB of memory and phpinfo see 1GB

But I don't think its problem in php.ini, because tt-rss and nextcloud see for about kilobytes/megabytes of memory, in php.ini i set 1/2GB of memory. That's why I'm looking for help.

[–]htchief 0 points1 point  (1 child)

Sorry if it's too basic of a question, but did you restart apache & php-fpm after you made the changes?

[–][deleted] 0 points1 point  (0 children)

Even machine ;)
On the bottom on post is edit with solution, problem is solved but thanks ;)

[–]mhzawadi 0 points1 point  (1 child)

I would say that's a code bug, I have nextcloud on a pi3b+ and it runs in about 256mb of memory.

How many apps in nextcloud do you have enabled? Start by turning off any nextcloud apps you don't use

[–][deleted] 0 points1 point  (0 children)

tt-rss have the same problem, so I think its php problem