2010-03-30 13 views
6

Il tentativo di estrarre il mio database da Heroku restituisce un errore durante il processo (sotto).Problema di Heroku durante il database Estrazione di Rails App: Mysql :: Errore Il server MySQL è andato via

Utilizzo: Snow Leopard; heroku-1.8.2; rubinetti-0.2.26; rails-2.3.5; mysql-5.1.42. Il database è piccolo, come puoi vedere dal messaggio di errore.

Il supporto tecnico di Heroku dice che si tratta di un problema sul mio sistema, ma non offre nulla sul modo di risolverlo.

Ho visto il problema segnalato in precedenza, ad esempio here. Come posso aggirare questo problema?

L'errore:

$ heroku db:pull 
Auto-detected local database: mysql://[...]@localhost/[...]?encoding=utf8 
Receiving schema 
Receiving data 
17 tables, 9,609 records 
[...] 
/Library/Ruby/Gems/1.8/gems/sequel-3.0.0/lib/sequel/adapters/mysql.rb:166:in `query': Mysql::Error MySQL server has gone away (Sequel::DatabaseError) 
    from /Library/Ruby/Gems/1.8/gems/sequel-3.0.0/lib/sequel/adapters/mysql.rb:166:in `_execute' 
    from /Library/Ruby/Gems/1.8/gems/sequel-3.0.0/lib/sequel/adapters/mysql.rb:125:in `execute' 
    from /Library/Ruby/Gems/1.8/gems/sequel-3.0.0/lib/sequel/connection_pool.rb:101:in `hold' 
    from /Library/Ruby/Gems/1.8/gems/sequel-3.0.0/lib/sequel/database.rb:461:in `synchronize' 
    from /Library/Ruby/Gems/1.8/gems/sequel-3.0.0/lib/sequel/adapters/mysql.rb:125:in `execute' 
    from /Library/Ruby/Gems/1.8/gems/sequel-3.0.0/lib/sequel/database.rb:296:in `execute_dui' 
    from /Library/Ruby/Gems/1.8/gems/sequel-3.0.0/lib/sequel/dataset.rb:276:in `execute_dui' 
    from /Library/Ruby/Gems/1.8/gems/sequel-3.0.0/lib/sequel/adapters/mysql.rb:365:in `execute_dui' 
    from /Library/Ruby/Gems/1.8/gems/sequel-3.0.0/lib/sequel/dataset/convenience.rb:126:in `import' 
    from /Library/Ruby/Gems/1.8/gems/sequel-3.0.0/lib/sequel/dataset/convenience.rb:126:in `each' 
    from /Library/Ruby/Gems/1.8/gems/sequel-3.0.0/lib/sequel/dataset/convenience.rb:126:in `import' 
    from /Library/Ruby/Gems/1.8/gems/sequel-3.0.0/lib/sequel/adapters/mysql.rb:144:in `transaction' 
    from /Library/Ruby/Gems/1.8/gems/sequel-3.0.0/lib/sequel/connection_pool.rb:108:in `hold' 
    from /Library/Ruby/Gems/1.8/gems/sequel-3.0.0/lib/sequel/database.rb:461:in `synchronize' 
    from /Library/Ruby/Gems/1.8/gems/sequel-3.0.0/lib/sequel/adapters/mysql.rb:138:in `transaction' 
    from /Library/Ruby/Gems/1.8/gems/sequel-3.0.0/lib/sequel/dataset/convenience.rb:126:in `import' 
    from /Library/Ruby/Gems/1.8/gems/taps-0.2.26/lib/taps/client_session.rb:211:in `cmd_receive_data' 
    from /Library/Ruby/Gems/1.8/gems/taps-0.2.26/lib/taps/client_session.rb:203:in `loop' 
    from /Library/Ruby/Gems/1.8/gems/taps-0.2.26/lib/taps/client_session.rb:203:in `cmd_receive_data' 
    from /Library/Ruby/Gems/1.8/gems/taps-0.2.26/lib/taps/client_session.rb:196:in `each' 
    from /Library/Ruby/Gems/1.8/gems/taps-0.2.26/lib/taps/client_session.rb:196:in `cmd_receive_data' 
    from /Library/Ruby/Gems/1.8/gems/taps-0.2.26/lib/taps/client_session.rb:175:in `cmd_receive' 
    from /Library/Ruby/Gems/1.8/gems/heroku-1.8.2/bin/../lib/heroku/commands/db.rb:17:in `pull' 
    from /Library/Ruby/Gems/1.8/gems/heroku-1.8.2/bin/../lib/heroku/commands/db.rb:119:in `taps_client' 
    from /Library/Ruby/Gems/1.8/gems/taps-0.2.26/lib/taps/client_session.rb:21:in `start' 
    from /Library/Ruby/Gems/1.8/gems/heroku-1.8.2/bin/../lib/heroku/commands/db.rb:115:in `taps_client' 
    from /Library/Ruby/Gems/1.8/gems/heroku-1.8.2/bin/../lib/heroku/commands/db.rb:16:in `pull' 
    from /Library/Ruby/Gems/1.8/gems/heroku-1.8.2/bin/../lib/heroku/command.rb:45:in `send' 
    from /Library/Ruby/Gems/1.8/gems/heroku-1.8.2/bin/../lib/heroku/command.rb:45:in `run_internal' 
    from /Library/Ruby/Gems/1.8/gems/heroku-1.8.2/bin/../lib/heroku/command.rb:17:in `run' 
    from /Library/Ruby/Gems/1.8/gems/heroku-1.8.2/bin/heroku:14 
    from /usr/bin/heroku:19:in `load' 
    from /usr/bin/heroku:19 
+0

Trovato questo post, hanno lo stesso problema. Qualche fortuna? Mi sono interrogato sulla codifica poiché il mio db locale è in utf-8 per impostazione predefinita, ma non sono riuscito a farlo funzionare. – wesgarrison

+0

Non utilizzare un database diverso in produzione e sviluppo. Non usare i rubinetti. Usa pgbackups. Prova http://postgresapp.com per l'installazione di postgres su os x. – Will

risposta

1

Si tratta di un problema nel sistema. La tua connessione al tuo server MySQL locale è stata interrotta mentre cercavi di inviare a Heroku. Una versione più recente di Sequel può essere d'aiuto, ma non sono sicuro che i tocchi la usino.

16

Ho riscontrato lo stesso problema sul mio sistema. Alla fine ho capito che il problema è l'errore.

Scavando nella libreria Sequel sono stato in grado di determinare che l'errore effettivo che stavo ricevendo era "Ho ottenuto un pacchetto più grande di 'byte max_allowed_packet'". Impostare quanto segue in /etc/my.cnf e riavviare mysql ha risolto il problema per me.

[mysqld] 
    max_allowed_packet = 32M 

Di default mysql è configurato per consentire un massimo di 1 megap carichi di dati. Quanto sopra imposta il limite a 32 mega.

+0

Non dimenticare di riavviare mysql! – Smickie

+0

Ha funzionato alla grande! Grazie per la correzione. – eAlchemist

-1

Come sopra, funziona. Basta creare un file: /etc/my.cnf e riavviare mysql.

[mysql] 
max_allowed_packet=32M 
[mysqld] 
max_allowed_packet=32M 
+2

Non è necessario duplicare una risposta già esistente. – ybakos

Problemi correlati