phpMyAdmin/nginx: 502 bad gateway 解决记录

  今天开机运行Nginx准备做本地测试,浏览器打开 phpMyAdmin 后提示 Nginx 进程崩溃。打开Nginx错误日志“error.log”没有任何有效信息。然后打开了phpMyAdmin的错误日志“***-PC.err”,提取有效信息如下:

140920 19:34:27 [Note] InnoDB: Using mutexes to ref count buffer pool pages

140920 19:34:27 [Note] InnoDB: The InnoDB memory heap is disabled

140920 19:34:27 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions

140920 19:34:27 [Note] InnoDB: Compressed tables use zlib 1.2.3

140920 19:34:27 [Note] InnoDB: Not using CPU crc32 instructions

140920 19:34:27 [Note] InnoDB: Initializing buffer pool, size = 128.0M

140920 19:34:27 [Note] InnoDB: Completed initialization of buffer pool

140920 19:34:27 [Note] InnoDB: Highest supported file format is Barracuda.

140920 19:34:27 [Note] InnoDB: The log sequence numbers 5900060 and 5900060 in ibdata files do not match the log sequence number 6080247 in the ib_logfiles!

140920 19:34:27 [Note] InnoDB: Database was not shutdown normally!

140920 19:34:27 [Note] InnoDB: Starting crash recovery.

140920 19:34:27 [Note] InnoDB: Reading tablespace information from the .ibd files...

2014-09-20 19:34:27 ec4  InnoDB: Operating system error number 2 in a file operation.

InnoDB: Some operating system error numbers are described at

InnoDB: http://dev.mysql.com/doc/refman/5.6/en/operating-system-error-codes.html

InnoDB: Error: could not open single-table tablespace file .\dota2\data_abilities -

InnoDB: We do not continue the crash recovery, because the table may become

InnoDB: corrupt if we cannot apply the log records in the InnoDB log to it.

InnoDB: To fix the problem and start mysqld:

InnoDB: 1) If there is a permission problem in the file and mysqld cannot

InnoDB: open the file, you should modify the permissions.

InnoDB: 2) If the table is not needed, or you can restore it from a backup,

InnoDB: then you can remove the .ibd file, and InnoDB will do a normal

InnoDB: crash recovery and ignore that table.

InnoDB: 3) If the file system or the disk is broken, and you cannot remove

InnoDB: the .ibd file, you can set innodb_force_recovery > 0 in my.cnf

InnoDB: and force InnoDB to continue crash recovery here.

  可以看到错误代码为2,查了一下MySQL官方网站的错误代码描述是“No such file or directory”。再回到错误日志,错误代码的上一句是“Reading tablespace information from the .ibd files...”,下一句是“Error: could not open single-table tablespace file .\dota2\data_abilities -”。可以看出错误与数据库 .\dota2\ 目录下的 *.ibd 文件有关。打开该目录,果然有一个之前手动备份的文件 data_abilities - 副本.ibd。删除之,重启 Nginx 和 MySQL,再次打开 phpMyAdmin,恢复正常。

时间: 2024-08-28 04:54:43

phpMyAdmin/nginx: 502 bad gateway 解决记录的相关文章

Nginx 502 Bad Gateway 解决方法

1查看fastcGI进程 ps -ef|grep 'php-fpm' 若没启动,启动 2系统文件打开数 ulimit -n 4096查看所有进程的文件打开数lsof |wc -l查看某个进程打开的文件数lsof -p pid |wc -l 一.fastcgi缓冲区设置过小 http { ... fastcgi_buffers 8 16k; fastcgi_buffer_size 32k; ... } 二.代理缓冲区设置过小如果你使用的是nginx反向代理,如果header过大,超出了默认的1k,

nginx 502 Bad Gateway 错误解决办法

一些运行在Nginx上的网站有时候会出现“502 Bad Gateway”错误,有些时候甚至频繁的出现.以下是小编搜集整理的一些Nginx 502错误的排查方法,供参考: Nginx 502错误的原因比较多,是因为在代理模式下后端服务器出现问题引起的.这些错误一般都不是nginx本身的问题,一定要从后端找原因!但nginx把这些出错都揽在自己身上了,着实让nginx的推广者备受置疑,毕竟从字眼上理解,bad gateway?不就是bad nginx吗?让不了解的人看到,会直接把责任推在nginx

Nginx 502 Bad Gateway 错误的原因及解决方法

http://my.oschina.net/zhouyuan/blog/118708 刚才在调试程序的时候,居然服务器502错误,昨天晚上也发生了,好像我没有做非常规的操作. 然后网上寻找了下答案, 把一些原因及解决方法汇总一下,以防生产环境下的502  会有好多种情况出现502错误,下面我们分情况来说一下. 一.fastcgi缓冲区设置过小 出现错误,首先要查找nginx的日志文件,目录为/var/log/nginx,在日志中发现了如下错误. 2013/01/17 13:33:47 [erro

Nginx 502 bad gateway错误解决思路

当网站打开遇到Nginx 502 bad gateway的错误,造成这种错误的原因有很多,下面分别解析nginx常见的502错误. 1.nginx配置文件错误 因为nginx找不到php-fpm了,所以报错,一般是fastcgi_pass后面的路径配置错误了,后面可以是socket或者是ip:port 解决方案: [[email protected] ~]# vim/usr/local/nginx/conf/vhosts/www.conf server {    listen 80;    se

Nginx 502/504 Gateway time-out错误完美解决方案【转发】

在安装完Nginx+PHP-fpm+Mysql后,跑PHP的应用会经常出现504 Gateway Time-out 或者502 Bad Gateway的情况. Nginx 504 Gateway Time-out 的含义是所请求的网关没有请求到,简单来说就是没有请求到可以执行的 PHP-CGI.这种情况可能是由于 nginx 默认的 fastcgi 进程响应的缓冲区太小造成的, 这将导致 fastcgi 进程被挂起, 如果你的 fastcgi 服务对这个挂起处理的不好, 那么最后就极有可能导致 

nginx 502 Bad Gateway 错误问题收集

nginx 502 Bad Gateway 错误问题收集 (2010-11-18 13:51:37) 转载▼ 标签: 杂谈 分类: 工作 nginx 502 Bad Gateway 错误问题收集 因为,nginx和lighttpd的文档真的很少,更不用说中文文档了,所以收集一些和502有关的错误在这里,保留来源地址,建议看来源地址的内容. 502是FastCGI出现问题,所以从FastCGI配置入手. 1.请检查你的FastCGI进程是否启动 2.FastCGI进程不够使用请通过执行 netst

nginx 502 bad gateway 问题处理集锦

一般看来, 这种情况可能是由于nginx默认的fastcgi进程响应的缓冲区太小造成的, 这将导致fastcgi进程被挂起, 如果你的fastcgi服务对这个挂起处理的不好, 那么最后就极有可能导致504 Gateway Time-out现在的网站, 尤其某些论坛有大量的回复和很多内容的, 一个页面甚至有几百K默认的fastcgi进程响应的缓冲区是8K, 我们可以设置大点 在nginx.conf里, 加入: fastcgi_buffers 8 128k 这表示设置fastcgi缓冲区为8×128

[Chrome_Error] (failed) net::ERR_INCOMPLETE_CHUNKED_ENCODING 与 nginx 502 bad gateway

Chrome 浏览器出现这个错误,还出现 nginx 502 bad gateway . 查看 nginx 的 error.log : 2015/12/18 14:34:44 [error] 1448#0: *26651 readv() failed (104: Connection reset by peer) while reading upstream, client: 192.168.2.112, server: xm.hinabian.com, request: "GET /qa_qu

nginx 502 Bad Gateway的解决方法总结

昨天自己的机器老提示502 Bad Gateway错误提示,下面小编来给大家总结关于nginx出现502 Bad Gateway的解决方法,有碰到此类问题的朋友可参考. 发生原因 1.PHP FastCGI进程数不够用 当网站并发访问巨大时,php fastcgi的进程数不有一定的保障,因为cgi是单线程多进程工作的,也就是说cgi需要处理完一个页面后再继续下一个页面.如果进程数不够,当访问巨大的时候,cgi按排队处理之前的请求,之后的请求只有被放弃.这个时候nginx就会不时的出现502错误.