# critical database situation (cyrus)



## circus78 (Aug 8, 2019)

Hi, I am using FreeBSD 12.0-RELEASE-p9 as mail server (with postfix and cyrus-imapd23-2.3.20_2).
I ofter get this error in /var/log/messages:




```
Aug  8 10:39:34 mail 1 2019-08-08T10:39:34.868788+02:00 mailserver imaps 98933 - - DBERROR db5: BDB0060 PANIC: fatal region error detected; run recovery

Aug  8 10:39:34 mail 1 2019-08-08T10:39:34.869004+02:00 mailserver imaps 98933 - - DBERROR: critical database situation

Aug  8 10:39:34 mail 1 2019-08-08T10:39:34.869382+02:00 mailserver master 90385 - - service imaps pid 98933 in READY state: terminated abnormally

Aug  8 10:39:34 mail 1 2019-08-08T10:39:34.869236+02:00 mailserver pop3s 98934 - - DBERROR db5: BDB0060 PANIC: fatal region error detected; run recovery

Aug  8 10:39:34 mail 1 2019-08-08T10:39:34.869473+02:00 mailserver pop3s 98934 - - DBERROR: critical database situation

Aug  8 10:39:34 mail 1 2019-08-08T10:39:34.869841+02:00 mailserver master 90385 - - service pop3s pid 98934 in READY state: terminated abnormally
```


if I start/stop cyrus service, problem goes away:


```
Aug  8 10:39:58 mail 1 2019-08-08T10:39:58.861947+02:00 mailserver ctl_cyrusdb 8831 - - recovering cyrus databases
Aug  8 10:39:58 mail 1 2019-08-08T10:39:58.974850+02:00 mailserver ctl_cyrusdb 8831 - - done recovering cyrus databases
Aug  8 10:39:59 mail 1 2019-08-08T10:39:59.002614+02:00 mailserver master 8830 - - ready for work
Aug  8 10:39:59 mail 1 2019-08-08T10:39:59.007709+02:00 mailserver ctl_cyrusdb 8832 - - checkpointing cyrus databases
Aug  8 10:39:59 mail 1 2019-08-08T10:39:59.025033+02:00 mailserver ctl_cyrusdb 8832 - - done checkpointing cyrus databases
```

How can fix this permanently?
Thank you


----------



## SirDice (Aug 8, 2019)

You already did?


```
Aug  8 10:39:34 mail 1 2019-08-08T10:39:34.869382+02:00 mailserver master 90385 - - service imaps pid 98933 in READY state: terminated abnormally
Aug  8 10:39:34 mail 1 2019-08-08T10:39:34.869236+02:00 mailserver pop3s 98934 - - DBERROR db5: BDB0060 PANIC: fatal region error detected; run recovery
```


```
Aug  8 10:39:58 mail 1 2019-08-08T10:39:58.861947+02:00 mailserver ctl_cyrusdb 8831 - - recovering cyrus databases
Aug  8 10:39:58 mail 1 2019-08-08T10:39:58.974850+02:00 mailserver ctl_cyrusdb 8831 - - done recovering cyrus databases
Aug  8 10:39:59 mail 1 2019-08-08T10:39:59.002614+02:00 mailserver master 8830 - - ready for work
```


----------



## usdmatt (Aug 8, 2019)

If it's happening regularly then your databases are becoming corrupt which is a bit worrying. You may want to start by looking for drive or filesystem errors.


----------



## circus78 (Aug 11, 2019)

SirDice said:


> You already did?
> 
> 
> ```
> ...



Hi SirDice,
generally after reboot problem goes away, but after 1 or 2 days I get same errors.


----------



## mark_j (Aug 12, 2019)

What does your search engine turn up?
Mine turned up:


			R: Re: DBERROR: critical database situation
		


... or you could switch to Dovecot.


----------

