Magento 2.0.2 installation on shared server - Stuck at 66%

Magento 2.0.2 installation on shared server - Stuck at 66%

September 3, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Magento 2.0.2 installation on shared server - Stuck at 66%

Debugging Magento 2 Installation Issues on Shared Servers

Installing Magento 2 on shared servers can be a challenge due to limited resources and configurations. One of the most common issues is the installation getting stuck at around 66% with no apparent reason.

Understanding the Error Message

The error message you’re encountering is caused by aWarning: Error while sending QUERY packet. This typically happens when the MySQL server cannot handle the packet size or when there are too many connections open to the database.

Here’s a breakdown of the error log:

  • Root Cause: The PDOStatement object (an object used for executing SQL statements) is throwing an exception because it failed to execute the query.
  • Location: The issue lies in the Zend_Db_Statement_Pdo.php file within the Magento framework, specifically at line 228.

Identifying Possible Causes

There could be several reasons why this error occurs on a shared server but not locally:

  1. Database Configuration: Shared hosting servers often have strict MySQL configurations to ensure fair resource usage among all accounts.
  2. Packet Size Limit: The maximum packet size for the MySQL connection might be too small, causing an overflow during the installation process.
  3. Too Many Connections: If there are already many open connections to the database from other processes or scripts on the server, this could limit the available resources for your Magento installation.

Steps to Resolve the Issue

1. Check MySQL Configuration

Ensure that the MySQL configuration is optimized for your needs:

  • Max_allowed_packet: This parameter determines the maximum size of one packet or any prepared statement. Increase it if needed, but be cautious not to use too high a value.
  • max_connections: If this limit is reached often, you may need to request an increase from your hosting provider.

2. Optimize PHP Settings

Check and adjust these PHP settings in your php.ini file or .htaccess file:

  • memory_limit: Increase the amount of memory PHP can use for a single script.
  • max_execution_time: Set this to a higher value, but remember that very high values could be problematic on shared servers.

Here’s an example of how you can increase these settings in your .htaccess file:

php_value memory_limit 1024M
php_value max_execution_time 600

3. Use a Database Optimizer

Tools like Magento’s built-in database optimization or third-party extensions can help reduce the load on the database server during installation.

4. Contact Your Hosting Provider

If you’ve optimized all settings and the issue persists, reach out to your hosting provider’s support team. They may need to adjust some server-level configurations or investigate if there are any ongoing issues with their MySQL setup.

Conclusion

Installing Magento 2 on a shared server requires careful tuning of PHP and MySQL configurations. The key is understanding the error messages and adjusting the right parameters based on your server’s limitations.

Remember, while increasing limits can help in this scenario, it’s crucial to strike a balance between performance and resource usage fairness with other users on the same server.

If you’re looking for more detailed guidance or professional support, consider reaching out to our team at Laravel Company. We specialize in Magento 2 installations and optimizations.

Magento 2 Database Configuration Customers

Our network