Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysqli_sql_exception #2002 #4640

Closed
mridah opened this issue May 3, 2021 · 1 comment
Closed

mysqli_sql_exception #2002 #4640

mridah opened this issue May 3, 2021 · 1 comment

Comments

@mridah
Copy link

mridah commented May 3, 2021

Describe the bug
Database operations randomly result in the error:

mysqli_sql_exception #2002
No such file or directory

It doesn't always happen otherwise it might have been a code issue. It works perfectly for a while,
then randomly it throws this error, and then again starts working properly.

Screenshot from 2021-05-03 16-20-37

CodeIgniter 4 version
CodeIgniter: 4.0.3

The error log :
`
CRITICAL - 2021-05-03 15:54:30 --> No such file or directory
#0 /var/www/html/myproj/system/Database/BaseConnection.php(377): CodeIgniter\Database\MySQLi\Connection->connect()
#1 /var/www/html/myproj/system/Database/BaseConnection.php(643): CodeIgniter\Database\BaseConnection->initialize()
#2 /var/www/html/myproj/system/Database/BaseBuilder.php(2836): CodeIgniter\Database\BaseConnection->query()
#3 /var/www/html/myproj/system/Model.php(952): CodeIgniter\Database\BaseBuilder->delete()
#4 /var/www/html/myproj/app/Controllers/Users/Delete.php(43): CodeIgniter\Model->delete()
#5 /var/www/html/myproj/system/CodeIgniter.php(914): App\Controllers\Users\Delete->index()
#6 /var/www/html/myproj/system/CodeIgniter.php(400): CodeIgniter\CodeIgniter->runController()
#7 /var/www/html/myproj/system/CodeIgniter.php(308): CodeIgniter\CodeIgniter->handleRequest()
#8 /var/www/html/myproj/public/index.php(45): CodeIgniter\CodeIgniter->run()
#9 {main}
CRITICAL - 2021-05-03 16:04:32 --> No such file or directory
#0 /var/www/html/myproj/system/Database/BaseConnection.php(377): CodeIgniter\Database\MySQLi\Connection->connect()
#1 /var/www/html/myproj/system/Database/BaseConnection.php(643): CodeIgniter\Database\BaseConnection->initialize()
#2 /var/www/html/myproj/system/Database/BaseBuilder.php(1845): CodeIgniter\Database\BaseConnection->query()
#3 /var/www/html/myproj/system/Model.php(1716): CodeIgniter\Database\BaseBuilder->get()
#4 /var/www/html/myproj/app/Controllers/Users/Manage.php(40): CodeIgniter\Model->__call()
#5 /var/www/html/myproj/system/CodeIgniter.php(914): App\Controllers\Users\Manage->index()
#6 /var/www/html/myproj/system/CodeIgniter.php(400): CodeIgniter\CodeIgniter->runController()
#7 /var/www/html/myproj/system/CodeIgniter.php(308): CodeIgniter\CodeIgniter->handleRequest()
#8 /var/www/html/myproj/public/index.php(45): CodeIgniter\CodeIgniter->run()
#9 {main}

`

Context

  • OS: Ubuntu 20.04
  • Web server : Apache 2
  • PHP version 7.4.3
@mridah mridah added the bug Verified issues on the current code behavior or pull requests that will fix them label May 3, 2021
@mridah mridah changed the title Bug: mysqli_sql_exception #2002 mysqli_sql_exception #2002 May 3, 2021
@paulbalandan
Copy link
Member

Please use the forum for support questions.

@paulbalandan paulbalandan removed the bug Verified issues on the current code behavior or pull requests that will fix them label May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants