gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Gnokii / smsd makes mysql process using 99% of cpu


From: Jan Derfinak
Subject: RE: Gnokii / smsd makes mysql process using 99% of cpu
Date: Sat, 28 May 2011 13:47:41 +0200 (CEST)
User-agent: Alpine 2.00 (LNX 1167 2008-08-23)

On Fri, 27 May 2011, João Areias wrote:

Hello.

Thanks for your report.

> 
> It appears to be a problem with the query :
> 
> SELECT id, number, text, dreport FROM outbox                          WHERE
> processed='0' AND CURTIME() >= not_before                          AND
> CURTIME() <= not_after AND phone = '1' LIMIT 1 FOR UPDATE
> 
>  
> 
> I think the problem is that this query locks the table/records.
> 

No, it's simpler. After patch from 09 Apr 2011, the query interval for
looking to outbox was too small and smsd overloads db server.
I added 5 seconds sleep if outbox doesn't contain unprocessed sms.

Please try attached patch.

Jan


> De: address@hidden
> [mailto:address@hidden Em nome
> de João Areias
> Enviada: sexta-feira, 27 de Maio de 2011 18:50
> Para: address@hidden
> Assunto: Gnokii / smsd makes mysql process using 99% of cpu
> 
>  
> 
> Hi,
> 
>  
> 
> I have installed the latest version of gnokii (0.6.31git) in debian 6.0.1.
> 
> Is there any reason for, as soon as I start one smsd daemon, mysqld (server)
> process  uses 99% of the cpu?
> 
>  
> 
> Then command is:
> 
> /usr/sbin/smsd -u smsgw -p pass -d user -c localhost -m mysql -t 1 -b IN -f
> /var/log/smsdaemon1.log
> 
>  
> 
> Thanks,
> 
>  
> 
>  
> 
> João Areias
> ...........................................................................
> ..........................................................
> Interacesso - Nortenet
> Avenida Dias da Silva N 230, 1º
> 
> 3000 - 135 Coimbra - Portugal
> Tel. (+351) 707 220 230 . Fax (+351) 707 220 239
> address@hidden
> www.interacesso.pt
> 
> AVISO
> 
> Esta mensagem (incluindo quaisquer anexos) pode conter informação
> confidencial para uso exclusivo do destinatário. Se não for o destinatário
> pretendido, não deverá usar, distribuir ou copiar este e-mail. Se recebeu
> esta mensagem por engano, por favor informe o emissor e elimine-a
> imediatamente. Obrigado.
> 
>  
> 
>  
> 
> 
> 

-- 

Attachment: dbload.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]