Semua Koleksi
Database MySQL
Memperbaiki error
Bagaimana cara mengatasi error max_connections_per_hour di MySQL?
Bagaimana cara mengatasi error max_connections_per_hour di MySQL?

Memperbaiki error max_connections_per_hour

Shinta Theofani avatar
Ditulis oleh Shinta Theofani
Diperbarui lebih dari satu minggu yang lalu

Lakukan opsi berikut jika website yang Anda hosting di Hostinger menampilkan error ini:

max_connections_per_hour limit:

Connection failed: User 'u1000000_database' has exceeded the 'max_connections_per_hour' resource (current value: 500)

Opsi 1 - Gunakan Localhost

Pastikan hostname database di file konfigurasi database seperti wp-config.php diatur ke localhost.

Tidak disarankan menggunakan server IP sebagai hostname database.

Contoh ❌

/** The name of the database for WordPress */

define( 'DB_NAME', 'u1000000_database' );

/** MySQL hostname */

define( 'DB_HOST', '104.20.160.69' );

Contoh ✅

/** The name of the database for WordPress */

define( 'DB_NAME', 'u1000000_database' );

/** MySQL hostname */

define( 'DB_HOST', 'localhost' );

Opsi 2 - Hentikan proses

Kode yang tidak dioptimasi di website dapat menyebabkan Anda mencapai limit max_user_connections. Untuk mengatasi ini, Anda dapat menghentikan koneksi secara manual dengan cara:

  • Buka database melalui phpMyAdmin

  • Klik SQL pada menu atas, ketik SHOW PROCESSLIST dan klik GO:

  • Setelah selesai, Anda dapat melihat daftar proses saat ini. Untuk menghentikan proses yang berjalan, klik Stop the process:

Kedua opsi di atas hanya dapat mengatasi error untuk sementara. Untuk menghilangkan error secara permanen, optimalkan kueri database atau upgrade paket Anda.

CATATAN:

Apakah pertanyaan Anda terjawab?