Skip to main content
We are aware of an issue after updating cPanel that causes cPanel SOLR to not start. Please see the following article for more information and updates:
Recent update including tzdata-java causes cPanel SOLR to not start.

[jailed shell]mmap() failed: [12] Cannot allocate memory

Comments

8 comments

  • cPanelLauren
    What is the global memory limit for the version of PHP you're running? You can find this at WHM>>Software>>MultiPHP INI Manger or via the CLI with the following (while logged in as the user): php -i |grep memory_limit
    You can change it with the whmapi1 function php_ini_set_directives function (ensure you're logged in as the root user) whmapi1 php_ini_set_directives directive-1=memory_limit%3A128m version=ea-php74
    replace the value for memory_limit to whatever you want to set it and ea-php74 with the ea-phpXX version you're using
    0
  • Luana Premoli
    Hi, appbac20@mydomain3294209.com.brr[~]# php -i |grep memory_limit memory_limit => 256M => 256M appbac20@appback.com.br [~]#
    I have another client on the same server where the result for "php -i | grep memory_limit" is the same and I can install it normally. hgtransf@hgtransf.com.br [~/public_html/laravel]# composer="/home2/hgtransf/public_html/laravel/composer.phar" hgtransf@hgtransf.com.br [~/public_html/laravel]# php $composer create-project laravel/laravel Creating a "laravel/laravel" project at "./laravel" Installing laravel/laravel (v7.12.0) - Installing laravel/laravel (v7.12.0): Downloading (100%) Created project in /home2/hgtransf/public_html/laravel/laravel > @php -r "file_exists('.env') || copy('.env.example', '.env');" Loading composer repositories with package information Updating dependencies (including require-dev) Package operations: 97 installs, 0 updates, 0 removals - Installing voku/portable-ascii (1.5.1): Downloading (100%) - Installing symfony/polyfill-ctype (v1.17.0): Downloading (100%) - Installing phpoption/phpoption (1.7.3): Downloading (100%) - Installing vlucas/phpdotenv (v4.1.6): Downloading (100%) - Installing symfony/css-selector (v5.1.0): Downloading (100%) - Installing tijsverkoyen/css-to-inline-styles (2.2.2): Downloading (100%) - Installing symfony/polyfill-php80 (v1.17.0): Downloading (100%) - Installing symfony/polyfill-mbstring (v1.17.0): Downloading (100%) - Installing symfony/var-dumper (v5.1.0): Downloading (100%) - Installing symfony/deprecation-contracts (v2.1.2): Downloading (100%) - Installing symfony/routing (v5.1.0): Downloading (100%) - Installing symfony/process (v5.1.0): Downloading (100%) - Installing symfony/polyfill-php72 (v1.17.0): Downloading (100%) - Installing symfony/polyfill-intl-idn (v1.17.0): Downloading (100%) - Installing symfony/mime (v5.1.0): Downloading (100%) - Installing psr/log (1.1.3): Downloading (100%) - Installing symfony/polyfill-php73 (v1.17.0): Downloading (100%) - Installing symfony/http-foundation (v5.1.0): Downloading (100%) - Installing psr/event-dispatcher (1.0.0): Downloading (100%) - Installing symfony/event-dispatcher-contracts (v2.1.2): Downloading (100%) - Installing symfony/event-dispatcher (v5.1.0): Downloading (100%) - Installing symfony/error-handler (v5.1.0): Downloading (100%) - Installing symfony/http-kernel (v5.1.0): Downloading (100%) - Installing symfony/finder (v5.1.0): Downloading (100%) - Installing symfony/polyfill-intl-normalizer (v1.17.0): Downloading (100%) - Installing symfony/polyfill-intl-grapheme (v1.17.0): Downloading (100%) - Installing symfony/string (v5.1.0): Downloading (100%) - Installing psr/container (1.0.0): Downloading (100%) - Installing symfony/service-contracts (v2.1.2): Downloading (100%) - Installing symfony/console (v5.1.0): Downloading (100%) - Installing symfony/polyfill-iconv (v1.17.0): Downloading (100%) - Installing doctrine/lexer (1.2.1): Downloading (100%) - Installing egulias/email-validator (2.1.17): Downloading (100%) - Installing swiftmailer/swiftmailer (v6.2.3): Downloading (100%) - Installing ramsey/collection (1.0.1): Downloading (100%) - Installing brick/math (0.8.15): Downloading (100%) - Installing ramsey/uuid (4.0.1): Downloading (100%) - Installing psr/simple-cache (1.0.1): Downloading (100%) - Installing opis/closure (3.5.3): Downloading (100%) - Installing symfony/translation-contracts (v2.1.2): Downloading (100%) - Installing symfony/translation (v5.1.0): Downloading (100%) - Installing nesbot/carbon (2.35.0): Downloading (100%) - Installing monolog/monolog (2.1.0): Downloading (100%) - Installing league/flysystem (1.0.69): Downloading (100%) - Installing league/commonmark (1.4.3): Downloading (100%) - Installing dragonmantank/cron-expression (v2.3.0): Downloading (100%) - Installing doctrine/inflector (2.0.3): Downloading (100%) - Installing laravel/framework (v7.14.1): Downloading (100%) - Installing fideloper/proxy (4.3.0): Downloading (100%) - Installing asm89/stack-cors (1.3.0): Downloading (100%) - Installing fruitcake/laravel-cors (v1.0.6): Downloading (100%) - Installing ralouphie/getallheaders (3.0.3): Downloading (100%) - Installing psr/http-message (1.0.1): Downloading (100%) - Installing guzzlehttp/psr7 (1.6.1): Downloading (100%) - Installing guzzlehttp/promises (v1.3.1): Downloading (100%) - Installing guzzlehttp/guzzle (6.5.4): Downloading (100%) - Installing dnoegel/php-xdg-base-dir (v0.1.1): Downloading (100%) - Installing nikic/php-parser (v4.5.0): Downloading (100%) - Installing psy/psysh (v0.10.4): Downloading (100%) - Installing laravel/tinker (v2.4.0): Downloading (100%) - Installing scrivo/highlight.php (v9.18.1.1): Downloading (100%) - Installing filp/whoops (2.7.2): Downloading (100%) - Installing facade/ignition-contracts (1.0.0): Downloading (100%) - Installing facade/flare-client-php (1.3.2): Downloading (100%) - Installing facade/ignition (2.0.6): Downloading (100%) - Installing fzaninotto/faker (v1.9.1): Downloading (100%) - Installing hamcrest/hamcrest-php (v2.0.0): Downloading (100%) - Installing mockery/mockery (1.3.1): Downloading (100%) - Installing nunomaduro/collision (v4.2.0): Downloading (100%) - Installing sebastian/version (2.0.1): Downloading (100%) - Installing sebastian/type (1.1.3): Downloading (100%) - Installing sebastian/resource-operations (2.0.1): Downloading (100%) - Installing sebastian/recursion-context (3.0.0): Downloading (100%) - Installing sebastian/object-reflector (1.1.1): Downloading (100%) - Installing sebastian/object-enumerator (3.0.3): Downloading (100%) - Installing sebastian/global-state (3.0.0): Downloading (100%) - Installing sebastian/exporter (3.1.2): Downloading (100%) - Installing sebastian/environment (4.2.3): Downloading (100%) - Installing sebastian/diff (3.0.2): Downloading (100%) - Installing sebastian/comparator (3.0.2): Downloading (100%) - Installing phpunit/php-timer (2.1.2): Downloading (100%) - Installing phpunit/php-text-template (1.2.1): Downloading (100%) - Installing phpunit/php-file-iterator (2.0.2): Downloading (100%) - Installing theseer/tokenizer (1.1.3): Downloading (100%) - Installing sebastian/code-unit-reverse-lookup (1.0.1): Downloading (100%) - Installing phpunit/php-token-stream (3.1.1): Downloading (100%) - Installing phpunit/php-code-coverage (7.0.10): Downloading (100%) - Installing doctrine/instantiator (1.3.1): Downloading (100%) - Installing phpdocumentor/reflection-common (2.1.0): Downloading (100%) - Installing phpdocumentor/type-resolver (1.1.0): Downloading (100%) - Installing webmozart/assert (1.8.0): Downloading (100%) - Installing phpdocumentor/reflection-docblock (5.1.0): Downloading (100%) - Installing phpspec/prophecy (v1.10.3): Downloading (100%) - Installing phar-io/version (2.0.1): Downloading (100%) - Installing phar-io/manifest (1.0.3): Downloading (100%) - Installing myclabs/deep-copy (1.9.5): Downloading (100%) - Installing phpunit/phpunit (8.5.5): Downloading (100%) symfony/routing suggests installing symfony/config (For using the all-in-one router or any loader) symfony/routing suggests installing symfony/yaml (For using the YAML loader) symfony/routing suggests installing symfony/expression-language (For using expression matching) symfony/routing suggests installing doctrine/annotations (For using the annotation loader) symfony/event-dispatcher suggests installing symfony/dependency-injection symfony/http-kernel suggests installing symfony/browser-kit symfony/http-kernel suggests installing symfony/config symfony/http-kernel suggests installing symfony/dependency-injection symfony/service-contracts suggests installing symfony/service-implementation symfony/console suggests installing symfony/lock swiftmailer/swiftmailer suggests installing true/punycode (Needed to support internationalized email addresses, if ext-intl is not installed) ramsey/uuid suggests installing ext-uuid (Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.) ramsey/uuid suggests installing ramsey/uuid-doctrine (Allows the use of Ramsey\Uuid\Uuid as Doctrine field type.) ramsey/uuid suggests installing paragonie/random-lib (Provides RandomLib for use with the RandomLibAdapter) symfony/translation suggests installing symfony/config symfony/translation suggests installing symfony/yaml monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server) monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server) monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server) monolog/monolog suggests installing elasticsearch/elasticsearch (Allow sending log messages to an Elasticsearch server via official client) monolog/monolog suggests installing php-amqplib/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib) monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required)) monolog/monolog suggests installing ext-mongodb (Allow sending log messages to a MongoDB server (via driver)) monolog/monolog suggests installing mongodb/mongodb (Allow sending log messages to a MongoDB server (via library)) monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB) monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar) monolog/monolog suggests installing php-console/php-console (Allow sending log messages to Google Chrome) league/flysystem suggests installing league/flysystem-eventable-filesystem (Allows you to use EventableFilesystem) league/flysystem suggests installing league/flysystem-rackspace (Allows you to use Rackspace Cloud Files) league/flysystem suggests installing league/flysystem-azure (Allows you to use Windows Azure Blob storage) league/flysystem suggests installing league/flysystem-webdav (Allows you to use WebDAV storage) league/flysystem suggests installing league/flysystem-aws-s3-v2 (Allows you to use S3 storage with AWS SDK v2) league/flysystem suggests installing league/flysystem-aws-s3-v3 (Allows you to use S3 storage with AWS SDK v3) league/flysystem suggests installing spatie/flysystem-dropbox (Allows you to use Dropbox storage) league/flysystem suggests installing srmklive/flysystem-dropbox-v2 (Allows you to use Dropbox storage for PHP 5 applications) league/flysystem suggests installing league/flysystem-cached-adapter (Flysystem adapter decorator for metadata caching) league/flysystem suggests installing league/flysystem-sftp (Allows you to use SFTP server storage via phpseclib) league/flysystem suggests installing league/flysystem-ziparchive (Allows you to use ZipArchive adapter) laravel/framework suggests installing ext-memcached (Required to use the memcache cache driver.) laravel/framework suggests installing ext-redis (Required to use the Redis cache and queue drivers (^4.0|^5.0).) laravel/framework suggests installing aws/aws-sdk-php (Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.0).) laravel/framework suggests installing doctrine/dbal (Required to rename columns and drop SQLite columns (^2.6).) laravel/framework suggests installing league/flysystem-aws-s3-v3 (Required to use the Flysystem S3 driver (^1.0).) laravel/framework suggests installing league/flysystem-cached-adapter (Required to use the Flysystem cache (^1.0).) laravel/framework suggests installing league/flysystem-sftp (Required to use the Flysystem SFTP driver (^1.0).) laravel/framework suggests installing moontoast/math (Required to use ordered UUIDs (^1.1).) laravel/framework suggests installing nyholm/psr7 (Required to use PSR-7 bridging features (^1.2).) laravel/framework suggests installing pda/pheanstalk (Required to use the beanstalk queue driver (^4.0).) laravel/framework suggests installing pusher/pusher-php-server (Required to use the Pusher broadcast driver (^4.0).) laravel/framework suggests installing symfony/cache (Required to PSR-6 cache bridge (^5.0).) laravel/framework suggests installing symfony/filesystem (Required to create relative storage directory symbolic links (^5.0).) laravel/framework suggests installing symfony/psr-http-message-bridge (Required to use PSR-7 bridging features (^2.0).) laravel/framework suggests installing wildbit/swiftmailer-postmark (Required to use Postmark mail driver (^3.0).) guzzlehttp/psr7 suggests installing zendframework/zend-httphandlerrunner (Emit PSR-7 responses) psy/psysh suggests installing ext-pdo-sqlite (The doc command requires SQLite to work.) psy/psysh suggests installing hoa/console (A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit.) filp/whoops suggests installing whoops/soap (Formats errors as SOAP responses) facade/ignition suggests installing laravel/telescope (^3.1) sebastian/global-state suggests installing ext-uopz (*) phpunit/php-code-coverage suggests installing ext-xdebug (^2.7.2) phpunit/phpunit suggests installing phpunit/php-invoker (^2.0.0) phpunit/phpunit suggests installing ext-xdebug (*) Writing lock file Generating optimized autoload files > Illuminate\Foundation\ComposerScripts::postAutoloadDump > @php artisan package:discover --ansi Discovered Package: facade/ignition Discovered Package: fideloper/proxy Discovered Package: fruitcake/laravel-cors Discovered Package: laravel/tinker Discovered Package: nesbot/carbon Discovered Package: nunomaduro/collision Package manifest generated successfully. 42 packages you are using are looking for funding. Use the `composer fund` command to find out more! > @php artisan key:generate --ansi Application key set successfully. hgtransf@hgtransf.com.br [~/public_html/laravel]# php -i |grep memory_limit memory_limit => 256M => 256M hgtransf@hgtransf.com.br [~/public_html/laravel]#
    Thanks
    0
  • cPanelLauren
    That doesn't necessarily mean that it will always work though. The other client may be using php memory limit in a different way you really can't compare accounts like that unless they have the exact same configuration, on the exact same server, with the exact same amount of traffic at the same time - which is nearly impossible.
    0
  • Luana Premoli
    Hi, I created this topic just to try to find out what's wrong with the first customer. What I meant by the previous answer is that it is not by changing a global server directive that the problem will be solved, because if this were the case, I believe that all customers of the same server would have the problem reported, which is not the case. case. The error occurs with a specific user. [root@br224 ~]# su hgtransf hgtransf@hgtransf.com.br [~]# php -i |grep memory_limit memory_limit => 256M => 256M hgtransf@hgtransf.com.br [~]# hgtransf@hgtransf.com.br [~]# hgtransf@hgtransf.com.br [~]# exit [root@br224 ~]# su appbac20 appbac20@mydomain3294209.com.brr[~]# php -i |grep memory_limit memory_limit => 256M => 256M appbac20@mydomain3294209.com.brr [~]# [/ C"DIGO] Does not work: http://br224.teste.website/~appbac20/phpinfo.php It works: http://br224.teste.website/~hgtransf/phpinfo.php
    0
  • vacancy
    Is "Shell Fork Bomb Protection" active?
    0
  • SamuelM
    Hello @Luana Premoli Can you please clarify whether you are running the commands from a standalone SSH client like Putty on Windows, or iTerm on a Mac? Or are you using the terminal emulator feature inside cPanel itself? Additionally, can you please let us know which version of cPanel is in use on the server where you receive the error message? If you are using the terminal emulator feature inside cPanel itself, it is likely that the "Fatal error: Out of memory (allocated 809508864) (tried to allocate 4096 bytes)" error occurs because the cPanel service itself imposes a maximum memory limit of 4096 bytes: -bash-4.2# grep maxmem /var/cpanel/cpanel.config maxmem=4096
    If this seems like a reasonable explanation for the error you're observing, I would suggest you try logging in with a standalone SSH client to resolve the problem. However, I am only speculating at this point based on the information available thus far. If my hypothesis doesn't apply in this case, please let us know and we will review further.
    0
  • Luana Premoli
    Hi, With "Shell Fork Bomb Protection" disabled, it works normally, but this is a shared server and we don't want to leave this option turned off. I am logging in through Putty with Jailed Shell user and password for a computer with Windows 10 Pro 64 bit OS. appbac20@mydomain3294209.com.brr [~]# grep maxmem /var/cpanel/cpanel.config maxmem=4096 appbac20@mydomain3294209.com.brr [~]#
    Server information: [root@224 ~]# grep '' /etc/redhat-release /usr/local/cpanel/version /var/cpanel/envtype; uname -r /etc/redhat-release:CentOS release 6.10 (Final) /usr/local/cpanel/version:11.86.0.21 /var/cpanel/envtype:kvm 4.14.146-225.ELK.el6.x86_64 [root@224 ~]#
    Thanks
    0
  • SamuelM
    Hello again @Luana Premoli Thank you for confirming that information. The Shell Fork Bomb Protection implements specific limits which are the reason the Composer CLI commands are failing. While researching this I found the following forum posts I would like to refer you to. Here is a basic overview and explanation about how user limits are implemented with the Jailshell system: Note that modifying these limits is not supported, and any changes you make will likely be overwritten when toggling Jailshell off or on again. However, hopefully these posts and the information discussed within will point you in the right direction. You may also want to consider enabling Normal Shell access for users that require unrestricted access. Best regards
    0

Please sign in to leave a comment.