douhan0562 2015-04-22 22:22
浏览 24

MySQL有结果但不会将结果返回给Web服务器

I found a strange situation that would like to have your help, here is my scenario.

  1. Webserver runs Apache + PHP + MySQL(5.6.12) Master mode

  2. OLAP runs MySQL(5.6.19) Slave mode

So, when users make a request to get a report from the webserver, it sends SQL stmt to OLAP to get result. Here is the problem, if the smtm has a small date range like 1 month, the data will return normally, but if the report takes a long time to process because it has a date range like one year, it will return nothing.

Let me explain "it will return nothing" meaning.

  1. The webserver sends a long-processed SQL stmt to the OLAP server.
  2. The OLAP server process the stmt for a while ( "Query" status in MySQL processlist) then turns to "Sleep" status.
  3. After going to Sleep status, it waits until 180 second (wait_timeout) which was set in MySQL, and then gets killed.
  4. In term of networking status, it shows ESTABLISHED, then FIN_WAIT1 and close connection with the webserver like normal TCP connection states.
  5. I tried to use Navicate for query the same stmt, Navicate gives me a result.
  6. I tried to use strace in both the web and OLAP, what I can get is Apache open "read" system call, and waiting data back from the OLAP server. At the same time, OLAP shows "poll" system call, but never return result back to the web server.

Please help me if you have been through the same situation.

Thanks.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 C# datagridview 栏位进度
    • ¥15 vue3页面el-table页面数据过多
    • ¥100 vue3中融入gRPC-web
    • ¥15 kali环境运行volatility分析android内存文件,缺profile
    • ¥15 写uniapp时遇到的问题
    • ¥15 vs 2008 安装遇到问题
    • ¥15 matlab有限元法求解梁带有若干弹簧质量系统的固有频率
    • ¥15 找一个网络防御专家,外包的
    • ¥100 能不能让两张不同的图片md5值一样,(有尝)
    • ¥15 informer代码训练自己的数据集,改参数怎么改