Era Host hosting
EraHost – Free Domain, Cheap Hosting!
Client Area
Support 24/7
Menu

MariaDB Limits - Understanding and Managing Database Limits

3 min read
26.03.2026

Database Limits Overview

MariaDB, like MySQL, has various limits related to connections, storage, queries, and performance. These limits can be controlled by server settings, hosting providers, or system resources.

MariaDB Database Limits and Optimization
MariaDB limits and tunables — connections, table size, query timeouts.

For the per-table InnoDB tunable, see MariaDB Maximum Table Size (innodb_file_per_table); for the query-cache angle, Fix: cacheEngine=none in MySQL/MariaDB; for the auth-plugin error you may hit alongside, Fixing "Authentication to host for user using method 'mysql_native_password' failed".

Common MariaDB Limits and How to Manage Them

Maximum Number of Databases (Hosting Limit)

Issue:

You may see errors like:

You have reached your maximum allotment of databases (0) or (1).

Fix:

  • Check database limit in hosting panel (cPanel, Plesk).
  • Upgrade hosting plan for more databases.
  • Use a single database with multiple tables instead.

Check database limits with:

SHOW DATABASES;

Maximum Connections (max_connections)

Issue:

If too many users connect at once, you may see:

ERROR 1040 (HY000): Too many connections

Fix:

  • Increase max_connections in my.cnf:

Edit /etc/my.cnf or /etc/mysql/my.cnf

[mysqld]
max_connections = 500
  • Restart MariaDB:
sudo systemctl restart mariadb
  • Use connection pooling for efficient resource use.

Check current max connections:

SHOW VARIABLES LIKE 'max_connections';

Maximum Table Size (innodb_file_per_table)

Issue:

Large databases may hit storage limits:

Table is full

Fix:

  • Enable innodb_file_per_table for independent table storage.
  • Increase innodb_buffer_pool_size in my.cnf:

Add to my.cnf configuration

[mysqld]
innodb_file_per_table = 1
innodb_buffer_pool_size = 1G
  • Use partitioning for large tables.

Check table size limit:

SHOW VARIABLES LIKE 'innodb_file_per_table';
Linux VDS
High performance for your projects
  • Root access and flexible setup
  • Control panel
  • NVMe disks
  • DDR5
Linux VDS

Query Timeout (max_execution_time)

Issue:

Long queries may be killed:

Query execution was interrupted

Fix:

  • Increase timeout in my.cnf:

Edit my.cnf configuration

[mysqld]
max_execution_time = 60000
  • Optimize slow queries with indexes.

Check current timeout:

SHOW VARIABLES LIKE 'max_execution_time';

Maximum Packet Size (max_allowed_packet)

Issue:

Large query results may fail:

Got a packet bigger than 'max_allowed_packet' bytes

Fix:

  • Increase max_allowed_packet in my.cnf:

Edit my.cnf configuration

[mysqld]
max_allowed_packet = 64M
  • Restart MariaDB after changes.

Check packet size limit:

SHOW VARIABLES LIKE 'max_allowed_packet';

Table and Column Limits

Limit Type Default Value Maximum Possible
Tables per Database Unlimited (Practical: 100,000) System-dependent
Columns per Table 4096 (MyISAM) / 1017 (InnoDB) System-dependent
Rows per Table 264 (InnoDB) System-dependent

Check table details:

SHOW TABLE STATUS FROM database_name;

Summary

Limit Type Fix
Database Limit (Hosting) Upgrade plan or use multiple tables in one database
Max Connections (max_connections) Increase in my.cnf, restart MariaDB
Table Size (innodb_file_per_table) Enable in my.cnf, optimize storage
Query Timeout (max_execution_time) Increase in my.cnf, optimize queries
Max Packet Size (max_allowed_packet) Increase in my.cnf, restart server

Final Recommendation

Now you can manage MariaDB limits effectively! Regular monitoring and proper configuration can prevent most common database issues.

Frequently asked questions
Not on its own. Raising max_connections without raising the OS file-descriptor limit produces the same error from a different layer. And each connection costs memory; doubling the limit on a small VPS can OOM the server. Pair it with a connection pool (PHP persistent connections, mysqli pool, PgBouncer-style proxy) before bumping the number itself.
The single largest SQL statement (or single largest result row) the server will process. The default in older MariaDB is 16 MB; if you import a dump that contains a BLOB > 16 MB, you get "max_allowed_packet too small". Set to 64 MB or 128 MB for typical dumps; 1 GB only if you actually have multi-hundred-MB rows.
Two different connection classes. wait_timeout applies to programmatic connections (PHP, Python, etc.). interactive_timeout applies to interactive shells (the mysql CLI). On a busy server, set wait_timeout low (60-120 s) so dead connections don't pile up; leave interactive_timeout long so your SSH-into-mysql session doesn't drop while you think.
SHOW VARIABLES LIKE '%limit%'; and SHOW VARIABLES LIKE 'max_%'; in a mysql shell. The displayed values reflect what MariaDB is actually running with — including overrides from /etc/mysql/conf.d/*.cnf that may not be obvious from looking at one file.
Related articles
421 Too Many Connections (8) From This IP — Mail Client Misconfiguration & Fixes
Fix: "You Are Using Your Maximum Allotment (1) of MariaDB/MySQL Databases"
Fixing MySQL Configuration for phpMyAdmin Export — System Administrator's Guide