Unable to upgrade from version 9.2.7 to 9.3.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • murugappan
    Active Community Member
    • Aug 2017
    • 529

    #1

    Unable to upgrade from version 9.2.7 to 9.3.0

    Hi yuri

    My server environment is running PHP 8.3.28 and ESPOCRM version 9.2.7 without any problems. Now i tried to upgrade to version 9.3.0 and it failed at download (see screen shot below) stage. I check the system error log and i get this error:

    [09-Feb-2026 06:01:32 UTC] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 39796568 bytes) in /home/systemdev/public_html/corporatecrm/application/Espo/Core/Console/Commands/Upgrade.php on line 297

    Click image for larger version

Name:	Screenshot_9.png
Views:	0
Size:	22.0 KB
ID:	124599
  • victor
    Active Community Member
    • Aug 2022
    • 1129

    #2
    Try increasing "memory_limit" in php.ini from 256M to 512M or 1024M.

    Comment


    • murugappan
      murugappan commented
      Editing a comment
      I tried all setting. Same problem.

    • yuri
      yuri commented
      Editing a comment
      You might have increased it for the web server's config. For CLI, a separate php.ini is used.
  • victor
    Active Community Member
    • Aug 2022
    • 1129

    #3
    - In the terminal, please run and report the result:

    HTML Code:
    php --ini
    - Submit a full-screen screenshot from Administration > System Requirements.

    Comment


    • murugappan
      murugappan commented
      Editing a comment
      [systemdev@vps public_html]$ php --ini
      Configuration File (php.ini) Path: /opt/cpanel/ea-php83/root/etc
      Loaded Configuration File: /opt/cpanel/ea-php83/root/etc/php.ini
      Scan for additional .ini files in: /opt/cpanel/ea-php83/root/etc/php.d
      Additional .ini files parsed: /opt/cpanel/ea-php83/root/etc/php.d/10-opcache.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-bcmath.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-bz2.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-calendar.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-ctype.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-curl.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-dba.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-dom.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-enchant.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-exif.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-fileinfo.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-ftp.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-gd.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-gettext.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-gmp.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-iconv.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-imap.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-intl.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-ldap.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-mbstring.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-mysqlnd.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-odbc.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-pdo.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-pgsql.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-phar.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-posix.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-simplexml.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-snmp.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-soap.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-sockets.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-sqlite3.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-tidy.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-tokenizer.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-xml.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-xmlwriter.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-xsl.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/20-zip.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/30-mysqli.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/30-pdo_mysql.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/30-pdo_odbc.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/30-pdo_pgsql.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/30-pdo_sqlite.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/30-xmlreader.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/imagick.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/sourceguardian.ini,
      /opt/cpanel/ea-php83/root/etc/php.d/zzzzzzz-pecl.ini
  • ironmaiden
    Junior Member
    • Nov 2019
    • 2

    #4
    Dear murugappan,
    use this command: php -d memory_limit=1G -d max_execution_time=0 command.php upgrade

    Comment


    • yuri
      yuri commented
      Editing a comment
      Note this often does not help, even can make things worse, as the upgrade script spawns sub processes that will use the parameter from the config. It's better to set it in the config.
  • Russ
    Senior Member
    • Feb 2022
    • 520

    #5
    On 3 installs all ok, one one, it's just driving me crazy, already 10+ times had to revert from the backup (thankfully, had one),

    I tried with 1GB, 2GB, 8GB in the command itself and via .ini file, always fails:

    [centos@crm-xxx www]$ sudo php command.php upgrade

    Current version is 9.2.7.

    EspoCRM will be upgraded to version 9.3.0 now. Enter [Y] to continue.

    y

    This may take a while. Do not close the terminal.

    Downloading...

    Upgrading...

    Initialization...

    Copying before upgrade files...

    Rebuilding...

    Before upgrade script execution...

    Rebuilding...

    Copying files...

    Rebuilding...PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /web/crm.lendingbeeinc.com/www/application/Espo/Core/Utils/Database/Orm/Converter.php on line 800




    Reverting...

    Unknown error on shell_exec.


    yuri, FYI Thanks!

    Comment

    • Russ
      Senior Member
      • Feb 2022
      • 520

      #6
      After all those intents, claude, suggested this:
      sudo php -d memory_limit=2048M command.php upgrade -s

      (important, -s) and it WORKED!!

      Comment


      • yuri
        yuri commented
        Editing a comment
        Heads up for those who's reading it. Do not run this command. Do not use the -s parameter.
    • Russ
      Senior Member
      • Feb 2022
      • 520

      #7

      Originally posted by Russ
      After all those intents, claude, suggested this:
      sudo php -d memory_limit=2048M command.php upgrade -s

      (important, -s) and it WORKED!!
      but GUI is not working..again, swapping back to 9.2.7

      [Thu Feb 12 00:31:35.067865 2026] [php:error] [pid 31813] [client 99.10.76.209:62115] PHP Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 20480 bytes) in /web/crm.xxx.com/www/application/Espo/Core/Utils/Util.php on line 240, referer: https://crm.xxx.com/

      Comment

      • yuri
        EspoCRM product developer
        • Mar 2014
        • 9656

        #8
        One needs to remove or increase memory limit for PHP in CLI. By default, PHP usually does not have memory limit in CLI. One just needs to locate the proper php.ini in fix the memory limit. That's it.

        Comment

        • murugappan
          Active Community Member
          • Aug 2017
          • 529

          #9
          Hi yuri

          I am using Linux VPS CPanel server. The app is installed in a sub-directory "corporatecrm" under public_html. I run the upgrade in SSH under the my app under a sub directory called "corporatecrm". Its odd:

          (1) I ran the following:
          PHP Code:
          php -grep -"memory_limit\|Loaded Configuration File\|Scan this dir for additional .ini" 
          (2) The output was:
          PHP Code:
          Loaded Configuration File => /opt/cpanel/ea-php83/root/etc/php.ini
          Scan this dir 
          for additional .ini files => /opt/cpanel/ea-php83/root/etc/php.d
          memory_limit 
          => 128M => 128M 
          (3) I did the upgrade with "php -d memory_limit=1024M command.php upgrade"
          (4) I got these:
          Current version is 9.2.7.
          EspoCRM will be upgraded to version 9.3.0 now. Enter [Y] to continue.
          Y
          This may take a while. Do not close the terminal.
          Downloading...
          Upgrading...
          Initialization...
          Copying before upgrade files...
          Rebuilding...
          Before upgrade script execution...
          Rebuilding...
          Copying files...
          Rebuilding...
          Copying after upgrade files...
          Rebuilding...
          After upgrade script execution...
          Rebuilding...
          Finalization...
          Upgrade is complete. Current version is .
          Newer version is available. Run command again to upgrade.


          (5) I do not why it gives a blank for current version (see lines in red). When i run the upgrade it states "There is no available upgrade"
          (6) However when i checked the app it seem to have upgraded without any problem.
          (7) I repeated the same steps for 4 other instances and got the same results.

          I am getting server management to update the CLI memory_limit for PHP 8.3 to 1024M
          Last edited by murugappan; 02-12-2026, 01:31 PM.

          Comment


          • victor
            victor commented
            Editing a comment
            Glad that the advice to increase "memory_limit" to 1024M for CLI worked for you.
            Regarding

            Upgrade is complete. Current version is .
            Newer version is available. Run command again to upgrade.
            That's how it should be. In the next versions (9.3.1+) everything will work according to the old principle.
        • ThomasB
          Senior Member
          • Mar 2022
          • 183

          #10
          About 5) Check the release notes:

          If after upgrade via CLI you receive a message that a new version is available and the current version number is not displayed, it's normal. You can run upgrade again and it will tell that you are on the latest version.

          This happens because we moved the version number from config.php to state.php but the upgrade command code, which is already in memory, reads from the config.php.

          Comment

        • Russ
          Senior Member
          • Feb 2022
          • 520

          #11
          Originally posted by yuri
          One needs to remove or increase memory limit for PHP in CLI. By default, PHP usually does not have memory limit in CLI. One just needs to locate the proper php.ini in fix the memory limit. That's it.
          After successful update, I can't open the GUI, apache logs show memory exhausted (20GB exhausted), any workaround?

          Comment


          • yuri
            yuri commented
            Editing a comment
            I've no idea. It's quite a lite upgrade, there where no significant changes. I'd look into the server side, database. The archive is big only because we changed the year in the copyright notice in every source file.
        Working...