Enhancement #3377
Email queue management: limit total email
Status: | CLOSED | Start date: | ||
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 100% | |
Category: | nethserver-mail-common | |||
Target version: | v6.7 | |||
Resolution: | NEEDINFO: | No |
Description
When the number of email in postfix queue is above "some thousands", the queue management page reports a php memory allocation failure.
I propose to limit the maximum number of email handled per request to 1000.
If the total number is higher, remaining email can be handled after dealing with the first 1000.
Associated revisions
Email queue management: limit total email. Refs #3377
Email queue management: limit total email. Refs #3377
History
#1 Updated by Filippo Carletti over 5 years ago
- Status changed from NEW to TRIAGED
- Assignee set to Filippo Carletti
- % Done changed from 0 to 20
I'd change /usr/share/nethesis//NethServer/Module/Mail/Queue.php
- $process = $this->getPlatform()->exec('/usr/bin/sudo /usr/sbin/postqueue -p | /usr/libexec/nethserver/mailq2json'); + $process = $this->getPlatform()->exec('/usr/bin/sudo /usr/sbin/postqueue -p | head -n 4000 | /usr/libexec/nethserver/mailq2json');
Every mail needs 4 lines, -n 4000 means 1000 emails.
#2 Updated by Filippo Carletti about 5 years ago
- Status changed from TRIAGED to ON_DEV
- % Done changed from 20 to 30
#3 Updated by Filippo Carletti about 5 years ago
- Status changed from ON_DEV to MODIFIED
- Assignee deleted (
Filippo Carletti) - % Done changed from 30 to 60
#4 Updated by Filippo Carletti about 5 years ago
- Status changed from MODIFIED to ON_QA
- % Done changed from 60 to 70
In testing:
nethserver-mail-common-1.5.4-1.1.gfeb508d.ns6.noarch.rpm
Test case.
1. fill the queue
service postfix stop for i in $(seq 1 5000); do mail -stest filippo@example.org </root/anaconda-ks.cfg ; done
2. access the queue management interface: php error
3. update and access queue management again
Note: during update postfix will be restarted and will try to deliver email
Remember to empty queue after test.
#5 Updated by Giacomo Sanchietti about 5 years ago
- Assignee set to Giacomo Sanchietti
#6 Updated by Giacomo Sanchietti about 5 years ago
- Status changed from ON_QA to VERIFIED
- Assignee deleted (
Giacomo Sanchietti) - % Done changed from 70 to 90
Before update, the GUI displays this error:
[1] Allowed memory size of 33554432 bytes exhausted (tried to allocate 101 bytes) See the system log for details.
After the the update, the web interface displays about 1.3 K mails.
#7 Updated by Giacomo Sanchietti about 5 years ago
- Status changed from VERIFIED to CLOSED
- % Done changed from 90 to 100
- 6.7/nethserver-updates: nethserver-mail-common-1.5.5-1.ns6.noarch.rpm
- 7.2/nethserver-base: nethserver-mail-common-1.5.5-1.28.gcd30ce8.ns7.noarch.rpm