Comments (9)
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.
What is the size of the file?
from docker-wordpress.
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.
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.
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.
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.
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.
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.
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)
- can not access https (nginx report 500 Internal Server Error) HOT 4
- Problems creating a second WordPress install with a shared database HOT 2
- First run of docker container and ssl certificate is shown in-secure HOT 8
- admin area not working HOT 1
- How do you backup your wordpress installs? HOT 1
- Wordpress monitoring HOT 1
- Split DB and WP service declarations into a separate docker-compose file HOT 2
- "Error establishing a database connection" while deploying the container, possible problem with passwords that have symbols HOT 1
- please upgrade wpcli with PHP 7.x HOT 1
- issue with the certificate
- SMTP settings HOT 1
- Wordpress cant curl to itself HOT 1
- Lets encrypt certificates are installed with the name of the proxy HOT 1
- Is there a way to host multiple wordpress sites using same db? Or multisite wordpress? HOT 1
- Https: Error Connection HOT 1
- ERROR: Network webproxy declared as external, but could not be found. Please create the network manually using `docker network create webproxy` and try again.
- Usage of REPLACE_ environmental variables. HOT 2
- Get rid of Apache web server in favor of nginx
- wp-config.php missing configuration HOT 4
- wordpress 6.0.2 and mysql 8.0 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-wordpress.