General |  Social Media |  Miscellaneous
Login
srcraft blog logo
  • Business
  • News
  • Shopping
  • Travel
  • Disease
  • Pets
  • Life
  • Health
  • Technology
  • Category
  • Contact Us
Latest Blog : 
☛ Upbringing: Don't cry or regret later ☛ True Story of Beggar: Punishment for the deeds done by us ☛ India: The Story of a Joint Family ☛ AI Driven Analytics | Life Sciences Data Analytics | WhizAI ☛ The Story of Gurukul: Test of intelligence ☛ The Problem Solving Skills ☛ Eternal law that never changes ☛ After all, why does Mahadev apply ashes on the body? ☛ Kitchen Worktops Buy now | Grey Worktops on sale ☛ Black Kitchen Worktops on Sale in UK 
Home > Innovation & Technology > Codeigniter

#2013 - Lost connection to MySQL server during query


#2013 - Lost connection to MySQL server during query

Usually that happens when you use JOIN for combining multiple table in database. If your mysql query takes more time, then server could give you negative response like

#2013 - Lost connection to MySQL server during query

Or

MySQL server has gone away

SELECT RELEASE_LOCK('b131086dbc463d8c717e59bd41af9cdd914ce035') AS ci_session_lock

May be you have below type of query

SELECT * FROM `table1` JOIN `table2` ON `table1`.`product_id` = `table2`.`sku` JOIN `table3` ON `table1`.`user_id` = `table3`.`cust_id` WHERE `date` BETWEEN "2018-07-01" AND "2018-07-31" GROUP BY `table1`.`order_id` ORDER BY `table1`.`date` DESC, `table1`.`order_id` DESC

And your above query is showing below result

 Showing rows 0 - 24 (67 total, Query took 18.9670 seconds.) [o_aaded_time: 2018-07-30 23:14:38... - 2018-07-24 01:52:02...] [o_order_id: 180730054438... - 180723082202...]

This will Killed queries for the database.

For solving this problem, you have to take below steps.

First of all, your query should be executed within 15 seconds. Currently above query is getting 18.9670 seconds. So you have to optimize your query and you have to reduce execution time below 15 seconds.

Another way for solving this issue is "Add below line into your my.cnf or my.ini in the [mysqld] section

max_allowed_packet=32M

Written By: Charles Miller Published in Codeigniter


Search

Publish your passions on srcraftblog.com

Latest Post

☛ Upbringing: Don't cry or regret later

☛ True Story of Beggar: Punishment for the deeds done by us

☛ India: The Story of a Joint Family

☛ AI Driven Analytics | Life Sciences Data Analytics | WhizAI

☛ The Story of Gurukul: Test of intelligence

☛ The Problem Solving Skills

☛ Eternal law that never changes

☛ After all, why does Mahadev apply ashes on the body?

☛ How to get an e-pass for curfew in Delhi, know the complete process in 6 easy steps

☛ 10 TIPS TO QUICKLY CLEAN YOUR JEWELLERY


We are accepting well-written informative Guest Posts on srcraftblog.com

Innovation & Technology

Artificial Intelligent blogs
Cryptocurrency blogs
Digital India blogs
Data science blogs
Neuroscience blogs
Programming blogs

Physical science

Physics blogs
Chemistry blogs
Earth science blogs
Geology blogs
Oceanography blogs
Meteorology blogs

Industry

Business blogs
Economy blogs
Freelancing blogs
Leadership blogs
Productivity blogs
Work blogs

Society

Basic income blogs
Education blogs
Environment blogs
Media blogs
Philosophy blogs
Women blogs
About us |  Write for us |  Terms and conditions |  Contact us

© 2022 SRCRAFT INIDA