大网数据广告活动
服务器运维问答

Wordpress import process ends in 502 Bad Gateway error

· 52CE 我爱测

I have a Wordpress website which have been working flawlessly for a while now in a LEMP with Ubuntu. However, today I had to import a previously exported XML from another Wordpress and in the middle of the process I get the 502 B…

问题原文

原帖链接 · Alain · CC BY-SA 4.0

I have a Wordpress website which have been working flawlessly for a while now in a LEMP with Ubuntu.

However, today I had to import a previously exported XML from another Wordpress and in the middle of the process I get the 502 Bad Gateway error.

Checking error.log, I see this:

2020/08/29 00:16:48 [error] 7#7: *954359 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 189.11.0.19, server: example.com, request: "POST /wp-admin/admin.php?import=wordpress&step=2 HTTP/1.1", upstream: "fastcgi://189.11.0.19:9001", host: "example.com", referrer: "https://example.com/wp-admin/admin.php?import=wordpress&step=1&_wpnonce=ef40a27516"

Why this happens? How can I fix this?

Thanks in advance.

Warm regards.

已采纳解答

原帖链接 · Michael Hampton · CC BY-SA 4.0

This usually happens if your import is large and PHP runs into its execution time limit.

You can restart the import and it will pick up where it left off. Depending on the size of the import, you may have to do this several times.

Alternatively, you can increase PHP's max_execution_time in php.ini, but even so you'll probably end up restarting the import several times anyway.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-08-29)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。