Skip to Content.
Sympa Menu

en - Re: [en@sympa] sympa behaviour when database is down

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: IKEDA Soji <address@concealed>
  • To: Darrin de Groot <address@concealed>
  • Cc: address@concealed
  • Subject: Re: [en@sympa] sympa behaviour when database is down
  • Date: Thu, 6 Oct 2022 17:26:54 +0900

Hi Darrin,

On 2022/10/06 16:32, Darrin de Groot wrote:
Hi Soji,

Thanks very much for your reply - it helped me to go back and look again at the logs, as our mariadb/mysql error is slightly different. We are running a galera cluster and it seems that the service was, in fact, up, but that the cluster was not ready to answer queries - resulting in an "Unable to execute SQL statement", rather than simply not being able to connect:

Aug 19 14:32:09 listserver sympa_msg[2969132]: err main::#243 > Sympa::Spindle::spin#95 > Sympa::Spindle::ToList::_twist#58 > Sympa::Spindle::ToList::_send_msg#205 > Sympa::List::get_total#1728 > Sympa::Database::
do_prepared_query#382 Unable to execute SQL statement "SELECT COUNT(*) FROM subscriber_table WHERE list_subscriber = ? AND robot_subscriber = ?": (08S01) WSREP has not yet prepared node for application use
Aug 19 14:32:09 listserver sympa_msg[2969132]: err main::#243 > Sympa::Spindle::spin#95 > Sympa::Spindle::ToList::_twist#58 > Sympa::Spindle::ToList::_send_msg#205 > Sympa::List::get_total#1737 Unable to get subsc
riber count for list Sympa::List <address@concealed>
Aug 19 14:32:09 listserver sympa_msg[2969132]: info Sympa::Spindle::ToList::_send_msg() No subscriber in list Sympa::List <address@concealed>

I'm guessing that this is a corner case. I have included the list config at the bottom of the email.

Indeed, this is an unexpected case. Currently Sympa is careful to ensure
that the database connection is not lost, but does not consider
situations where the connection is valid while the database is not
functioning (in your case the cluster has been broken and not yet
restored).

I submitted a new issue dealing with this problem on GitHub. Please
post additional comments there:
https://github.com/sympa-community/sympa/issues/1491

Thanks you for information.

Regards,
-- Soji


Regards,

Darrin


On 06/10/2022 08:34, IKEDA Soji wrote:
Hi Darrin,

On 2022/09/01 17:48, Darrin de Groot wrote:
Hi,

We're using sympa 6.2.60 and had an incident the other day whereby our database server had an outage. During this time we noticed that the postfix on the sympa server accepted incoming email, passed them off to sympa which then processed the emails, archived them correctly, but did not deliver any email as it (understandably) couldn't determine the subscriber list - we saw this type of error in the logs (note - I altered the name of the list):

Aug 19 14:33:40 listserver sympa_msg[2969132]: info Sympa::Spindle::ToList::_send_msg() No subscriber in list Sympa::List <address@concealed>

Is there any option or configuration that could enable sympa to queue incoming email or bounce back to the sender in the event that the database is down rather than assume that the list is empty?

I couldn't reproduce the problem you encountered.
The expected behavior of Sympa is as described in below.

To help resolve your problem, please let us know the configuration of
the list in question (such as config file).

Regards,
-- Soji

                                      ***

I tried with Sympa 6.2.68.

I stopped database server (MariaDB) keeping Sympa services running,
and sent a message to a list.

Then, sympa_msg.pl accepted the message but paused processing of it, and
repeatedly output the following log.

| Oct  6 14:59:43 listserver sympa_msg[6000]: err main::#243 > Sympa::Sp
| indle::spin#95 > Sympa::Spindle::ToList::_twist#58 > Sympa::Spindle::T
| oList::_send_msg#198 > Sympa::List::sync_include#4080 > Sympa::List::h
| as_included_users#5704 > Sympa::Database::do_prepared_query#360 > Symp
| a::DatabaseDriver::MySQL::connect#58 > Sympa::Database::connect#171 Ca
| n't connect to Database Sympa::DatabaseDriver::MySQL <db_host=localhos
| t;db_name=sympa;db_user=sympa>, still trying...

I restared database server.  After a few minutes, this log appeared:

| Oct  6 15:16:14 listserver sympa_msg[6000]: notice Sympa::Database::co
| nnect() Connection to Database Sympa::DatabaseDriver::MySQL <db_host=l
| ocalhost;db_name=sympa;db_user=sympa> restored

Then sympa_msg.pl resumed processing the message and it was delivered.


Regards,

Darrin


List config:

##############

owner
reception mail
profile privileged
visibility noconceal
email address@concealed

subject IT Group list

visibility noconceal

topics computers

lang en-US

send public

digest 5 20:56

available_user_options
reception mail

default_user_options
reception mail
visibility noconceal

reply_to_header
apply respect
value all

custom_subject IT

reject_mail_from_automates_feature off

rfc2369_header_fields archive,help,owner,post,subscribe,unsubscribe

info conceal

subscribe closed

unsubscribe closed

invite closed

review private

shared_doc
d_edit private
d_read private

process_archive on

archive
mail_access owner
web_access private

sql_fetch_timeout 300

include_ldap_2level_query
attrs1 memberUid
use_tls ldaps
timeout2 30
scope1 sub
timeout1 30
filter2 uid=[attrs1]
name Ldap Group IT
select1 all
ssl_ciphers ALL
suffix2 ou=People,dc=domain,dc=com
select2 first
attrs2 mail
scope2 sub
suffix1 ou=Group,dc=domain,dc=com
host ldap.domain.com
ssl_version tlsv1_2
ca_verify required
filter1 (&(objectClass=posixGroup)(cn=it))

clean_delay_queuemod 15

pictures_feature on

creation
email address@concealed
date_epoch 1537184092
date 17 Sep 2018 at 13:34:52

update
date_epoch 1648628119
email address@concealed

status open

serial 34



--
株式会社 コンバージョン
ITソリューション部 システムソリューション1グループ 池田荘児
e-mail address@concealed
https://www.conversion.co.jp/



Archive powered by MHonArc 2.6.19+.

Top of Page