skip to Main Content

I have set up a fresh instance of Drupal 8 and installed two modules:

  • Paragraphs (8.x-1.12)
  • Entity Reference Revisions (8.x-1.9)

I have also installed the Barrio theme (Barrio 5.5.1.)

Then I have gone ahead and created a new content type with two fields (both Paragraph Revisions.)
When trying to add a new page by navigating to Content -> Add, everything works fine until I go ahead and make any modifications to the Form Display or Display Settings of the Content Type.
Once modifications have been made, regardless which modifications, I get an error 500 upon adding a page of said Content Type.

The relevant log entries:

var/www/vhosts/some-website.com/httpdocs/core/lib/Drupal/Core/Field/WidgetBase.php on line 510', referer: https://some-website.com/node/add/

[Thu Jun 24 16:33:28.779959 2021] [proxy_fcgi:error] [pid 10213:tid 140020013704960] [client 91.249.132.211:43799] AH01071: Got error 'PHP message: PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 135168 bytes) in /var/www/vhosts/some-website.com/httpdocs/core/lib/Drupal/Core/Field/WidgetBase.php on line 510'

[Thu Jun 24 16:36:33.558731 2021] [proxy_fcgi:error] [pid 10213:tid 140019649947392] [client 91.249.132.211:62936] AH01071: Got error 'PHP message: PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 135168 bytes) in /var/www/vhosts/some-website.com/httpdocs/modules/paragraphs/src/Plugin/Field/FieldWidget/InlineParagraphsWidget.php on line 821', referer: https://some-website.com/node/add/

[Thu Jun 24 16:36:55.127020 2021] [proxy_fcgi:error] [pid 10213:tid 140019616376576] [client 91.249.132.211:63829] AH01071: Got error 'PHP message: PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 135168 bytes) in /var/www/vhosts/some-website.com/httpdocs/core/lib/Drupal/Core/Field/WidgetBase.php on line 510'

I have already tried increasing the memory limit to extreme values, but without success.
I am currently using PHP v7.3.28 as well as Drupal core 8.9.16.
The installation is running on a Linux server through Plesk.

Does anyone have a clue what could be wrong?

2

Answers


  1. Just a question (that could be your answer as well): did your server is shared? Does it have enough memory to run the application or at least have enough memory to execute the primary installation commands?

    I had the same issue on Magento, but it’s because the server it’s shared and when I tried using some CI/CD script to deploy the application on the server the composer was breaking due to the memory heap.

    But anyway the issue could be following reasons:

    • Your server doesn’t have enough memory.
    • The php.ini configuration is setting a maximum memory cap of usage.

    Sometimes could be too the library since is taking soo long to install (due to internet connections or the online repository facing issues) and the PHP is hanging waiting for the installation to done and since it takes more time more memory is being used.

    Anyway, the error indicates that for the operation that you’re trying to do you don’t have enough memory for the same.

    Login or Signup to reply.
  2. Your memory is set to less than 256MB which is what it tried to allocate – (268435456 + 135168) / 1024 / 1024

    You mentioned,

    I have already tried increasing the memory limit to extreme values, but without success.

    In a comment,

    Yes, definitely successful and no change, regardless of the value set

    If you go to /admin/reports/status, is that reporting the 256MB or is it reporting the higher, extreme, value that you’re are setting up.

    If it’s not displaying, go to /admin/reports/status/php and look for Loaded Configuration File. That value will point to the php.ini file you should be modifying.

    Make sure you are modifying that file.

    If that is the file you are modifying, I’d just try restarting the whole server. Either you are only restarting Apache and PHP is not running as a module or there’s something else going on like there being an upper limit or the value being overridden in another location.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search