Postfix impatient with mysql?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Postfix impatient with mysql?

Robert Moskowitz
It seems postfix is impatient with connecting with mysql, as I see in
maillog entries like:

Apr  6 11:48:30 z9m9z dovecot: dict: Error: mysql(localhost): Connect
failed to database (postfix): Can't connect to local MySQL server
through socket '/var/lib/mysql/mysql.sock' (13) - waiting for 5 seconds
before retry
Apr  6 11:48:35 z9m9z dovecot: dict: Error: mysql(localhost): Connect
failed to database (postfix): Can't connect to local MySQL server
through socket '/var/lib/mysql/mysql.sock' (13) - waiting for 25 seconds
before retry

I suspect it does connect eventually.  This is a test system with only
1GB of memory and free reports:

               total        used        free      shared buff/cache  
available
Mem:        1025484      696344       24556 21528      304584      251552
Swap:        524284       92168      432116


The production box has 2GB, so if the problem is mysql is swapping out,
that will be 'fixed', if it is processor, well this is an ARMv7 duo
core, as is the production box.  I am considering buying the new quad core.

Is there anything I can do to get postfix more patient with mysql, or
just ignore there messages?

thank you



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Postfix impatient with mysql?

Wilfried.Essig@Essignetz.de
Possibly you should ask some dovecot people. The loglines you provided,
show processname "dovecot", not postfix.


Willi


Am 06.04.2017 um 17:54 schrieb Robert Moskowitz:

> It seems postfix is impatient with connecting with mysql, as I see in
> maillog entries like:
>
> Apr  6 11:48:30 z9m9z dovecot: dict: Error: mysql(localhost): Connect
> failed to database (postfix): Can't connect to local MySQL server
> through socket '/var/lib/mysql/mysql.sock' (13) - waiting for 5 seconds
> before retry
> Apr  6 11:48:35 z9m9z dovecot: dict: Error: mysql(localhost): Connect
> failed to database (postfix): Can't connect to local MySQL server
> through socket '/var/lib/mysql/mysql.sock' (13) - waiting for 25 seconds
> before retry
>
> I suspect it does connect eventually.  This is a test system with only
> 1GB of memory and free reports:
>
>                total        used        free      shared buff/cache  
> available
> Mem:        1025484      696344       24556 21528      304584      251552
> Swap:        524284       92168      432116
>
>
> The production box has 2GB, so if the problem is mysql is swapping out,
> that will be 'fixed', if it is processor, well this is an ARMv7 duo
> core, as is the production box.  I am considering buying the new quad core.
>
> Is there anything I can do to get postfix more patient with mysql, or
> just ignore there messages?
>
> thank you
>
>
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Oops - Re: Postfix impatient with mysql?

Robert Moskowitz
I should get new glasses...

That is database postfix by dovecot.  Sigh.

On 04/06/2017 12:01 PM, [hidden email] wrote:

> Possibly you should ask some dovecot people. The loglines you provided,
> show processname "dovecot", not postfix.
>
>
> Willi
>
>
> Am 06.04.2017 um 17:54 schrieb Robert Moskowitz:
>> It seems postfix is impatient with connecting with mysql, as I see in
>> maillog entries like:
>>
>> Apr  6 11:48:30 z9m9z dovecot: dict: Error: mysql(localhost): Connect
>> failed to database (postfix): Can't connect to local MySQL server
>> through socket '/var/lib/mysql/mysql.sock' (13) - waiting for 5 seconds
>> before retry
>> Apr  6 11:48:35 z9m9z dovecot: dict: Error: mysql(localhost): Connect
>> failed to database (postfix): Can't connect to local MySQL server
>> through socket '/var/lib/mysql/mysql.sock' (13) - waiting for 25 seconds
>> before retry
>>
>> I suspect it does connect eventually.  This is a test system with only
>> 1GB of memory and free reports:
>>
>>                 total        used        free      shared buff/cache
>> available
>> Mem:        1025484      696344       24556 21528      304584      251552
>> Swap:        524284       92168      432116
>>
>>
>> The production box has 2GB, so if the problem is mysql is swapping out,
>> that will be 'fixed', if it is processor, well this is an ARMv7 duo
>> core, as is the production box.  I am considering buying the new quad core.
>>
>> Is there anything I can do to get postfix more patient with mysql, or
>> just ignore there messages?
>>
>> thank you
>>
>>
>>
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Postfix impatient with mysql?

John Stoffel-2
In reply to this post by Robert Moskowitz

Robert> It seems postfix is impatient with connecting with mysql, as I see in
Robert> maillog entries like:

Robert> Apr  6 11:48:30 z9m9z dovecot: dict: Error: mysql(localhost): Connect
Robert> failed to database (postfix): Can't connect to local MySQL server
Robert> through socket '/var/lib/mysql/mysql.sock' (13) - waiting for 5 seconds
Robert> before retry
Robert> Apr  6 11:48:35 z9m9z dovecot: dict: Error: mysql(localhost): Connect
Robert> failed to database (postfix): Can't connect to local MySQL server
Robert> through socket '/var/lib/mysql/mysql.sock' (13) - waiting for 25 seconds
Robert> before retry

Robert> I suspect it does connect eventually.  This is a test system with only
Robert> 1GB of memory and free reports:

Robert>                total        used        free      shared buff/cache  
Robert> available
Robert> Mem:        1025484      696344       24556 21528      304584      251552
Robert> Swap:        524284       92168      432116


Robert> The production box has 2GB, so if the problem is mysql is
Robert> swapping out, that will be 'fixed', if it is processor, well
Robert> this is an ARMv7 duo core, as is the production box.  I am
Robert> considering buying the new quad core.

Robert> Is there anything I can do to get postfix more patient with
Robert> mysql, or just ignore there messages?

Just as a side note, I setup my home server with dovecot, postfix,
mysql and I ended up removing mysql because it was a memory pig for a
not-very big install.  In your case, if you're running on an ARMv7
dual CPU box, it also isn't too big so I'd prboably not bother.
sqlite or even flat files should be more than performant enough for
your needs.

John




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Postfix impatient with mysql?

Robert Moskowitz


On 04/06/2017 02:17 PM, John Stoffel wrote:

> Robert> It seems postfix is impatient with connecting with mysql, as I see in
> Robert> maillog entries like:
>
> Robert> Apr  6 11:48:30 z9m9z dovecot: dict: Error: mysql(localhost): Connect
> Robert> failed to database (postfix): Can't connect to local MySQL server
> Robert> through socket '/var/lib/mysql/mysql.sock' (13) - waiting for 5 seconds
> Robert> before retry
> Robert> Apr  6 11:48:35 z9m9z dovecot: dict: Error: mysql(localhost): Connect
> Robert> failed to database (postfix): Can't connect to local MySQL server
> Robert> through socket '/var/lib/mysql/mysql.sock' (13) - waiting for 25 seconds
> Robert> before retry
>
> Robert> I suspect it does connect eventually.  This is a test system with only
> Robert> 1GB of memory and free reports:
>
> Robert>                total        used        free      shared buff/cache
> Robert> available
> Robert> Mem:        1025484      696344       24556 21528      304584      251552
> Robert> Swap:        524284       92168      432116
>
>
> Robert> The production box has 2GB, so if the problem is mysql is
> Robert> swapping out, that will be 'fixed', if it is processor, well
> Robert> this is an ARMv7 duo core, as is the production box.  I am
> Robert> considering buying the new quad core.
>
> Robert> Is there anything I can do to get postfix more patient with
> Robert> mysql, or just ignore there messages?
>
> Just as a side note, I setup my home server with dovecot, postfix,
> mysql and I ended up removing mysql because it was a memory pig for a
> not-very big install.  In your case, if you're running on an ARMv7
> dual CPU box, it also isn't too big so I'd prboably not bother.
> sqlite or even flat files should be more than performant enough for
> your needs.

I support virtual domains and use postfixadmin.

Granted not many domains and < 10,000 messages per day.

I am currently running on a CubieTruck (duo core, 2GB, ARMv7) with
Redsleeve 6 (Centos 6 clone) and time-matching componenets.

My development to replace it is on a Cubieboard2 (same as above, but
1GB) with Centos 7.

I don't get any of these messages on the current server.  So perhaps it
is just a memory thing.  I will start testing on another CubieTruck soon
and that will show if memory is the bottleneck.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Postfix impatient with mysql?

John Stoffel-2
>>>>> "Robert" == Robert Moskowitz <[hidden email]> writes:

Robert> On 04/06/2017 02:17 PM, John Stoffel wrote:
Robert> It seems postfix is impatient with connecting with mysql, as I see in
Robert> maillog entries like:
>>
Robert> Apr  6 11:48:30 z9m9z dovecot: dict: Error: mysql(localhost): Connect
Robert> failed to database (postfix): Can't connect to local MySQL server
Robert> through socket '/var/lib/mysql/mysql.sock' (13) - waiting for 5 seconds
Robert> before retry
Robert> Apr  6 11:48:35 z9m9z dovecot: dict: Error: mysql(localhost): Connect
Robert> failed to database (postfix): Can't connect to local MySQL server
Robert> through socket '/var/lib/mysql/mysql.sock' (13) - waiting for 25 seconds
Robert> before retry
>>
Robert> I suspect it does connect eventually.  This is a test system with only
Robert> 1GB of memory and free reports:
>>
Robert> total        used        free      shared buff/cache
Robert> available
Robert> Mem:        1025484      696344       24556 21528      304584      251552
Robert> Swap:        524284       92168      432116
>>
>>
Robert> The production box has 2GB, so if the problem is mysql is
Robert> swapping out, that will be 'fixed', if it is processor, well
Robert> this is an ARMv7 duo core, as is the production box.  I am
Robert> considering buying the new quad core.
>>
Robert> Is there anything I can do to get postfix more patient with
Robert> mysql, or just ignore there messages?
>>
>> Just as a side note, I setup my home server with dovecot, postfix,
>> mysql and I ended up removing mysql because it was a memory pig for a
>> not-very big install.  In your case, if you're running on an ARMv7
>> dual CPU box, it also isn't too big so I'd prboably not bother.
>> sqlite or even flat files should be more than performant enough for
>> your needs.

Robert> I support virtual domains and use postfixadmin.

Can it work with sqlite instead?  

Robert> Granted not many domains and < 10,000 messages per day.

Like my home system, which is probably under 2,000/day messages.

Robert> I am currently running on a CubieTruck (duo core, 2GB, ARMv7)
Robert> with Redsleeve 6 (Centos 6 clone) and time-matching
Robert> componenets.

Robert> My development to replace it is on a Cubieboard2 (same as above, but
Robert> 1GB) with Centos 7.

Robert> I don't get any of these messages on the current server.  So
Robert> perhaps it is just a memory thing.  I will start testing on
Robert> another CubieTruck soon and that will show if memory is the
Robert> bottleneck.

I suspect so.  Mysql is a bit of a pig for small memory systems, esp
if you're running other stuff like rspamd as well.

John

Loading...