this post was submitted on 09 Nov 2024
17 points (94.7% liked)

Linux

48287 readers
652 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Crossposted from : https://lemmy.ml/post/22319676

I just install a complete new Drupal install in a Debian VM inside proxmox, everything works as intended, but I cannot add content to it(it gives me a 500 error).

Apache logs show me that the memory is exhausted, search online, no real answer, tried a lot of thing in PHP.ini, .htaccess… At first the VM had 1 vcpu and 1GB of RAM, not working, I’ve put the PHP memory limit to 1GB, give 8GB to the vm, and 4vcpu. Not working, just “loading” the 500 longer.

Error got into /var/log/apache2/error.log : PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes)) in Unknown on line 0. This is why I give the vm 8GB and change php memory_limit to 1GB but it did nothing…

Have no solutions, as now. If you have one please let me know! thanks 🙂

EDIT: this is not the problem of drupal 11, tried to install it with drupal 10, same result, I think it has something to do with proxmox

top 14 comments
sorted by: hot top controversial new old
[–] krnl386@lemmy.ca 4 points 1 week ago* (last edited 1 week ago)

Make a plain text file under Apache somewhere with .php extension and stick the following into it:


<?php phpinfo(); ?>

Ctrl+F the word “memory” and see if anything looks off.

[–] rimu@piefed.social 3 points 1 week ago (1 children)

I was a drupal dev for 10 years.

There's no way it should use that much ram. You probably have a contrib module installed that has a bug in it. Try a process of elimination till you find the module it is.

[–] foremanguy92_@lemmy.ml 1 points 1 week ago (1 children)

Gonna check all modules, but I have only the default ones, gonna try

[–] foremanguy92_@lemmy.ml 1 points 1 week ago (1 children)

Checked 90% of them, nothing changed. I only have the default modules, I think it is a proxmox-related issue do you have any idea?

[–] rimu@piefed.social 2 points 1 week ago* (last edited 1 week ago) (1 children)

So weird!

Very unlikely to be a proxmox issue.

134217728 bytes is only 138 MB so your php memory limit is set lower than you think. Your php config needs work. Restart Apache and php-fpm (if using) after changing php.ini and use phpinfo(); to check that your changes were applied successfully.

A memory limit of 256 MB should be ok.

[–] foremanguy92_@lemmy.ml 1 points 1 week ago (1 children)

Set the memory to 256MB, got this error : PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 262144 bytes) in Unknown on line 0

[–] rimu@piefed.social 2 points 1 week ago (1 children)

Ok if trying a memory limit of 512MB doesn't work then I'm out of ideas, sorry.

[–] foremanguy92_@lemmy.ml 1 points 1 week ago

Sorry but it doesn't work, I'm going to try it on my localhost, not on my server, see if it's the fault of proxmox

[–] nicgentile@lemmy.world 3 points 1 week ago (1 children)

You need to check your error logs. Assuming a Linux setup it would be somewhere around /var/logs/*

[–] foremanguy92_@lemmy.ml 1 points 1 week ago

Here you are (error got into /var/log/apache2/error.log) : PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes)

This is why I give the vm 8GB and change php memory_limit to 1GB but it did nothing...

[–] undefined@lemmy.hogru.ch 3 points 1 week ago* (last edited 1 week ago) (1 children)

I’m a Ruby on Rails developer and it’s been a decade or two since I’ve used Drupal, but why does it want so much memory? We host Drupal-based apps in Kubernetes at work and they need nowhere near that much memory.

I would probably investigate what library or piece of code is requesting so much.

[–] foremanguy92_@lemmy.ml 2 points 1 week ago

I think that there is a memory leak somewhere, but don't know really how to find it out

[–] rimu@piefed.social 2 points 1 week ago (1 children)

Any interesting things in Reports -> Status? Sometimes there are warnings in there which point to config issues.

[–] foremanguy92_@lemmy.ml 1 points 1 week ago

answered you on your other comment