Segmentation fault

I have quite odd fault, after upgrade, when I run occ command I have Segmentation fault error. It could be not related to upgrade as I didn’t run this command for quite some time. The server runs alright from apache2. But I cannot fix missing indices now. PHP 7.4 with fpm service. All runs on Mint 19.1
Edit:
Tried to run php with -d memory_limit=4G but no better. Just switched to PHP8.0 and the problem is still present. I think, I exhausted all options now. Nothing in apache2 error.log, php8.0-fpm.log, syslog: Mar 1 10:15:20 server kernel: [ 1770.523736] php[20521]: segfault at 7ffcfb08dfd0 ip 00005612a49c3339 sp 00007ffcfb08dfa0 error 6 in php8.0[5612a4705000+40d000]

Changed php.ini in /etc/php/8.0/cli/php.ini from -1 to 4G and now have error while trying to run occ command:

PHP Fatal error:  Allowed memory size of 4294967296 bytes exhausted (tried to allocate 20480 bytes) in /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php on line 133

edit:
memory_limit = 8G

PHP Fatal error:  Allowed memory size of 8589934592 bytes exhausted (tried to allocate 20480 bytes) in /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php on line 133

memory_limit = 512M

PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 266240 bytes) in /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php on line 133

Found solution:
Addinng apc.enable_cli=1 in /etc/php/8.0/cli/conf.d/20-apcu.ini as @andreasus suggests in https://help.nextcloud.com/t/solved-occ-command-php-fatal-error-allowed-memory-size-of-xxx-bytes-exhausted/108521/17 solved the problem

3 Likes