Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
[2002] 'Connection Timed Out' when trying to view page
  • I recently ran into some problems with getting migrations to work and finally got migrations to run but now after I run the migration with refine(after scaffolding) and go to the page I get the error 2002 'Connection Timed Out' with a backtrace list. I know it's not my connection because everything is working fine with the database and I get no errors when running fuel. Is it a problem with the ORM? I have the controller, model, and view but I can't see the page....any ideas?
  • Nope, and I've never seen it before either.

    You get this when running oil, but not when running the app? That suggests that it's a php-cli configuration issue of some sort.

    What happens if you try to access your database from the console? Try:

    php oil console

    and then at the console prompt:

    $x = DB::select()->from('migrations')->execute(); // or some other table that exists

    Do you get the same error?
  • I'm not getting the error message in oil. The error is on the page I am trying to view (www.mysite.com/articles)
  • Ah, ok, the other way around. And you're sure your config is identical to the one used by oil (or do you run your website in "development environment")?

    Where is your database server running? On your local machine, on the LAN, or on the internet somewhere? Or a firewall in the path that prematurely disconnects connections? Did you configure persistent connections? If so, what happens if you don't?

    The error is pretty unambiguous, your database connection runs in a timeout and disconnects.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion