504 Gateway Time-out when running large SQL command

Hey everyone!

First time posting here and I'm still very much a noob when it comes to the world of setting up my own server but I learn quickly.

The problem I'm having is I'm trying to migrate one of my sites to a linode server and I'm running into a problem importing the sql dump from the old server to the new server via Import in PhpMyAdmin.

It's a large sql file (38 megs) that is already on the server and in the phpmyadmin uploads folder so when I go to import, it's already available and I don't have to upload anything. I click import and it does about 16 of the tables and then gives a 504 Gateway Time-out error. The max_execution time is set to 240 (after changing it from 120 earlier thinking that might fix the problem).

I'm running mysql 5.1.43, php 5.2.12 and NGINX 0.7.65 on a linode 360.

I had no issues migrating my small wordpress sites but this one is a bit bigger.

Any help would be awesome! Thanks!!

5 Replies

It's a message from the Nix gods to learn CLI (and drop that wacky phpmyadmin stuff).

helpful as that was…

still doesn't seem like an error that should happen

Try importing it from the command line. The error might be due to something being wrong, and on the command line you'll be able to see it.

If you have a file of SQL, it should be as simple as:

mysql -u user -p < dump.sql

This of course depends on how the dump was created. If you see DROP and CREATE DATABASE statements in the SQL, this'll work – if not, you need to set up an infrastructure for it.

Set keepalive_timeout to 0 (infinity) in your nginx.conf – that should hopefully fix it. You may want to change it back afterwards, obviously. Else use Jed's suggestion ;)

Cheers.

thanks everyone for the help. not entirely sure what happened but I tired a different way off getting the sql dump and this one imported all the entries before giving me the timeout :P LOL!

now i have a bunch of nginx questions…but that is for another thread :)

cheers!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct