1

Topic: Can't connect to MySQL server on '127.0.0.1'

==== Required information ====
- iRedMail version (check /etc/iredmail-release): iRedAdmin-Pro    v2.7.0 (MySQL)
- Linux/BSD distribution name and version: Ubuntu 16
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

IredAdmin has default configuration.
Server is not operational, no traffic any mail, no relay, it stand by.

Can anybody help me?

Error Logs:
==========================================================================================
Traceback (most recent call last):
  File "/opt/www/iredadmin/tools/delete_mailboxes.py", line 160, in <module>
    qr = conn.select('deleted_mailboxes', where=sql_where)
  File "/usr/lib/python2.7/dist-packages/web/db.py", line 682, in select
    return self.query(qout, processed=True)
  File "/usr/lib/python2.7/dist-packages/web/db.py", line 643, in query
    db_cursor = self._db_cursor()
  File "/usr/lib/python2.7/dist-packages/web/db.py", line 566, in _db_cursor
    return self.ctx.db.cursor()
  File "/usr/lib/python2.7/dist-packages/web/db.py", line 507, in _getctx
    self._load_context(self._ctx)
  File "/usr/lib/python2.7/dist-packages/web/db.py", line 518, in _load_context
    ctx.db = self._connect(self.keywords)
  File "/usr/lib/python2.7/dist-packages/web/db.py", line 546, in _connect
    return self.db_module.connect(**keywords)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/__init__.py", line 81, in Connect
    return Connection(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 204, in __init__
    super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError: (2003, "Can't connect to MySQL server on '127.0.0.1' (111)")
==========================================================================================

==========================================================================================
Traceback (most recent call last):
  File "/opt/iredapd/tools/cleanup_db.py", line 34, in <module>
    total_before = sql_count_id(conn_iredapd, 'throttle_tracking')
  File "/opt/iredapd/tools/../tools/__init__.py", line 81, in sql_count_id
    what='count(%s) as total' % column)
  File "/usr/lib/python2.7/dist-packages/web/db.py", line 682, in select
    return self.query(qout, processed=True)
  File "/usr/lib/python2.7/dist-packages/web/db.py", line 643, in query
    db_cursor = self._db_cursor()
  File "/usr/lib/python2.7/dist-packages/web/db.py", line 566, in _db_cursor
    return self.ctx.db.cursor()
  File "/usr/lib/python2.7/dist-packages/web/db.py", line 507, in _getctx
    self._load_context(self._ctx)
  File "/usr/lib/python2.7/dist-packages/web/db.py", line 518, in _load_context
    ctx.db = self._connect(self.keywords)
  File "/usr/lib/python2.7/dist-packages/web/db.py", line 546, in _connect
    return self.db_module.connect(**keywords)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/__init__.py", line 81, in Connect
    return Connection(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 204, in __init__
    super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError: (1040, 'Too many connections')
==========================================================================================

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Can't connect to MySQL server on '127.0.0.1'

emiliojl wrote:

_mysql_exceptions.OperationalError: (1040, 'Too many connections')

MySQL server reaches limit of max connections.

What's the max connection setting in your MySQL config file (my.cnf)?

3

Re: Can't connect to MySQL server on '127.0.0.1'

Thanks!