Tagged: ,

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1057157

    Hi guys,
    I encountered an annoying problem on my page, already dealing with it for a couple of days. If I upload an image I get a 502 Bad Gateway Error. Well, there are a couple of lists on the web pointing out possible solutions, but I already tried almost everything and its not yet working. The weird thing is that the error doesnt seem to occur all the time, some rare times an image uploads properly, but I can’t see a pattern of when it works and when it doesn’t (imagesize, dimensions, format, name…).
    I already added define( ‘WP_MEMORY_LIMIT’, ‘256M’ ); and define( ‘WP_MAX_MEMORY_LIMIT’, ‘256M’ ); to the wp-config.php and cleared the htaccess from some stuck and old caching code from a plugin but it seems it had no effect. All plugins except of WooCommerce are already disabled or completely uninstalled. Now the reason why I ask you guys to hopefully help me solve this problem. As I completely reinstalled WordPress and the Enfold theme, I checked again if I get the 502 Bad Gateway Error when uploading mediafiles and as long as Twenty Nineteen Theme was activated the upload somehow worked. So I guess it must be a Theme-specific Error, or something wrong in the Databases the Theme uses (I am not very convenient with coding and that kind of stuff). Not at the very beginning of the error but right now I also get some messages in the debug.log which indicate some memory limit issues (but the weird thing, it all works with twenty nineteen and wp_memory_limit is already set to 256M)

    [21-Jan-2019 13:55:43 UTC] PHP Notice: Undefined index: upload_folder in /wp-content/themes/enfold/framework/php/class-framework-widgets.php on line 3372
    [21-Jan-2019 14:50:27 UTC] PHP Fatal error: Out of memory (allocated 12582912) (tried to allocate 462848 bytes) in /wp-content/themes/enfold/css/dynamic-css.php on line 985
    [21-Jan-2019 14:50:47 UTC] PHP Fatal error: Out of memory (allocated 23068672) (tried to allocate 81920 bytes) in /wp-includes/class-wp-theme.php on line 1019

    I hope you can help me with this topic, as I have no more ideas how to handle this, and obviously dont want to use the twenty nineteen theme or switch themes every time I upload some media.
    Thanks a lot in advance
    Kind regards,
    Chris

    #1057345

    Hey chrizz06,

    Please post us your login credentials (in the “private data” field), so we can take a look at your backend.

    1. Install and activate ” Temporary Login Without Password “.
    2. Go to ” Users > Temporary Logins ” on the left-side menu.
    3. Click ” Create New “.
    4. Add the email address for the account ( you can use (Email address hidden if logged out) ), as well as the ” Role ” making that the highest possible and the expiry about four days
      ( do be sure that we have enough time to debug ).
    5. Click ” Submit “.
    6. You’ll now have a temporary account. Please provide us here in the private section the URL, so we can login and help you out.

    When your issue is fixed, you can always remove the plugin!
    If you prefer to not use the plugin, you can manually create a admin user and post the login credentials in the “private data” field.

    Best regards,
    Nikko

    #1057376

    Hi Nikko, thanks a lot for the fast reply.
    In the Private Content you find the URL for temporary login. Hope we can solve this. I also set up a temp FTP access for you. Just in case.
    Best regards,
    Chris

    #1058369

    Hi,

    I have run some tests, your php memory limit is on 32M, seems that the code from wp-config is not working

    Best regards,
    Basilis

    #1058764

    Thanks a lot Basilis.
    Do you have any idea on why the memory limit isn’t working as I think the code is put correctly in the wp-config? Is it just this line which doesnt work or is it the whole wp-config? I also put in the code for post-revisions and apparently that line isnt working as well. Could it be possible that the php memory limit works on another theme, as like I mentioned above, I dont get a 502 Bad Gateway Error when Twenty Nineteen is activited? And most important, do you have any ideas on how to solve this?
    Best regards,
    Chris

    #1059281

    Hi Chris,

    What type of hosting are you on? If it’s shared then your hosting provider might be block anything which would increase the memory limit on individual installation, I would suggest that you contact your hosting provider to see if that is the case. Enfold is a memory intensive theme if you compare to TwentyNineteen, so that is likely why it’s working when you switch to that.

    Best regards,
    Rikard

    #1062731

    I had already contacted my hosting provider and the support didn’t tell me anything about blocked memory limit. They even increased it to 512 MB for me, which obviously didn’t help either. I think some plugin completely messed up my database or I don’t know. Anyway, my solution after trying to fix it in each and every possible way which didn’t work out for over one week:
    1. Screenshots of the WP and Enfold Options
    2. Export Pages and Media
    3. Delete all Plugins, Databases, Theme and finally WordPress
    4. Completely fresh install of WordPress
    5. Import Pages and Media
    Took me about 4 hours. Of course this isn’t the best solution, but if I would have done it like this at the beginning would have saved me one week. Just for others to consider this option, if they cant solve their suddenly occuring bad gateway the “normal way”.

    Best regards,
    Chris

    #1063074

    Hi Chris,

    Thanks for the update, so everything is working as it should after you did that? If so then thanks for sharing your solution.

    Best regards,
    Rikard

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.