1

Topic: Hotfix for iRedMail-0.7.1 (MySQL backend): iRedAPD stops suddenly.

Dear all,

Some users reported that iRedAPD in iRedMail-0.7.1 (MySQL backend special) will stop suddenly, and MySQL server complains 'too many connections'.
Bug report post: http://www.iredmail.org/forum/topic1776 … eived.html

The root cause is incorrect SQL operation in iRedAPD, it won't close sql connection immediately, that makes too many sleeping sql connections.

You can fix it with below steps:

- Download these two files:

http://iredapd.iredmail.googlecode.com/ … iredapd.py
http://iredapd.iredmail.googlecode.com/ … _policy.py

- Replace /opt/iredapd/src/iredapd.py with downloaded "iredapd.py".
- Replace /opt/iredapd/src/plugins/sql_alias_access_policy.py with downloaded
"sql_alias_access_policy.py".

- Set correct file permission on these two new files:

# chown iredapd:iredapd /opt/iredapd/src/iredapd.py
# chown iredapd:iredapd /opt/iredapd/src/plugins/sql_alias_access_policy.py
# chmod 0700 /opt/iredapd/src/iredapd.py
# chmod 0700 /opt/iredapd/src/plugins/sql_alias_access_policy.py

- Restart iRedAPD service.

# /etc/init.d/iredapd restart

That's all.

----

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

2

Re: Hotfix for iRedMail-0.7.1 (MySQL backend): iRedAPD stops suddenly.

After "# /etc/init.d/iredapd restart"

[root@mail src]# /etc/init.d/iredapd restart
iredapd is already stopped.
Starting iredapd ...
  File "/opt/iredapd/src/iredapd.py", line 79
    logging.debug('Error: %s. Use default action instead:
                                                         ^
SyntaxError: EOL while scanning single-quoted string

Thanks,
Tony

3

Re: Hotfix for iRedMail-0.7.1 (MySQL backend): iRedAPD stops suddenly.

winpr wrote:

  File "/opt/iredapd/src/iredapd.py", line 79
    logging.debug('Error: %s. Use default action instead:
                                                         ^
SyntaxError: EOL while scanning single-quoted string

It works for me here. Can you please create a new forum topic and paste line 78, 79, 80, 81 of file "/opt/iredapd/src/iredapd.py" in your post?

4

Re: Hotfix for iRedMail-0.7.1 (MySQL backend): iRedAPD stops suddenly.

Worked for me