GithubHelp home page GithubHelp logo

Comments (9)

casaucao avatar casaucao commented on June 5, 2024 1

SOLVED!

It's was a memory issue. The containers were running on a 512MB RAM instance (too few mem) Adding a Swap page solved the problem for me.

This link just made my day: https://stackoverflow.com/a/13999800

Thank you very much for your support. You did a very great job!

from docker-wordpress.

evertramos avatar evertramos commented on June 5, 2024

What is the size of the file?

from docker-wordpress.

casaucao avatar casaucao commented on June 5, 2024

Exported xml file size is 280kb.

Once exported, I choose Wordpress importer, and I select "download and import file attachments", then I got the 502 error (upstream prematurely closed connection while reading response header from upstream)

from docker-wordpress.

evertramos avatar evertramos commented on June 5, 2024

That's weird... this is the log of the proxy? of the wordpress container? I thing this probably not related with the repo itself.. but the wordpress data...

Do you have the same url name for the domain you are having?

from docker-wordpress.

casaucao avatar casaucao commented on June 5, 2024

Actually weird. The log is from nginx container, not from wordpress container. I don't really know how to see error logs from wordpress container. This is what I do:

docker logs --details -f [wordpress_container]

and I get the following info while I'm trying to import the xml file:

 172.18.0.4 - - [07/Jul/2018:11:33:20 +0000] "GET /wp-admin/import.php?import=wordpress HTTP/1.1" 200 6617 "https://example.com/wp-admin/import.php" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36"
 172.18.0.4 - - [07/Jul/2018:11:33:31 +0000] "POST /wp-admin/admin.php?import=wordpress&step=1&_wpnonce=7dad11711c HTTP/1.1" 200 6904 "https://example.com/wp-admin/import.php?import=wordpress" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36"
 172.18.0.4 - - [07/Jul/2018:11:34:00 +0000] "GET /wp-admin/load-styles.php?c=0&dir=ltr&load%5B%5D=dashicons,buttons,forms,l10n,login&ver=4.9.7 HTTP/1.1" 200 37059 "https://example.com/wp-login.php" "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Googlebot/2.1; +http://www.google.com/bot.html) Safari/537.36"
 172.18.0.4 - - [07/Jul/2018:11:34:01 +0000] "GET /favicon.ico HTTP/1.1" 404 465 "-" "Googlebot-Image/1.0"

Apparently there are no errors but I think this is the access log instead error log.


Domains are differents. Old is example.wordpress.com and new is example.com.


AFAIK wordpress+apache container is going to retreive data (posts, comments, images,... ) from example.wordpress.com through the nginx proxy container. At some stage, wordpress or apache container fails and nginx proxy shows a 502 error message logging "upstream prematurely closed connection while reading response header from upstream" in the nginx container. At least this is what I think, but I don't know how to identify the issue in order to solve it.

from docker-wordpress.

evertramos avatar evertramos commented on June 5, 2024

After the import the container remains up?

Try to add the wp-cli to your composer and update the url in database or pull up a phpmyadmin in your docker and check the database what might be wrong... I don´t think there is something in container itself... might be wordpress settings... not sure at all

from docker-wordpress.

casaucao avatar casaucao commented on June 5, 2024

Yes, after the import the container remains up!


Database is ok. No issues.


I'm added wp-cli as follow:

sudo docker run -it --user root --rm --volumes-from wordpress --network container:[container_id] wordpress:cli /bin/sh

Once I got a shell, I type:

wp import exported_file.xml --authors=create --debug

And the importer script FAILS:

Processing post #145 ("IMG_8180-1") (post_type: attachment)
-- 57 of 133 (in file example.wordpress.2018-07-05.xml)
-- Sun, 08 Jul 2018 08:19:59 +0000
Killed

If I remove that media entry from the exported file all works fine. I open that image in a browser and that image is 5184x3456px. Maybe an OOM error?

from docker-wordpress.

casaucao avatar casaucao commented on June 5, 2024

I fear this is not an OOM error.

I have deleted all database and wordpress files and containers, then I reinstalled wordpress from scratch. When I have launched wp import I have discovered that there are multiples media entries that "kill" the process.

All images are about 4000x2000 5000x3000px ~~.

If I launch again the wp-cli import command, all works fine (the new process imports the failing image and continue importing the rest of the images until the next "killed")

I have to repeat

wp import exported_file.xml --authors=create --debug

at least 15 times in order to get all the images.

from docker-wordpress.

evertramos avatar evertramos commented on June 5, 2024

Thanks @casaucao!!

It seems it did a better job! by solving the issue. Thanks for sharing and we will keep that tip for the future.

Cheers!

from docker-wordpress.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.