This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Akonadi PostgreSQL server won't start anymore

Tags: None
(comma "," separated)
alvanx
Registered Member
Posts
136
Karma
1
OS
Jfyi, I don't really know anything about databases and the only reason I even fiddled with akonadi's backend was that MySQL and SQLite were giving me headaches. PostgreSQL worked beautifully though - until yesterday. This might be related to a crash, I'm not sure. The fact is, the Akonadi server refuses to start.

Here's akonadiserverrc:
Code: Select all
[%General]
Driver=QPSQL

[QPSQL]
StartServer=true
Name=akonadi
Host=/home/alvanx/.local/share/akonadi/socket-alvanx
Options=
ServerPath=/usr/bin/postgres #same results with pg_ctl, I do believe "postgres" was preset though
InitDbPath=/usr/bin/initdb
User=
Password=
Port=5432

[QMYSQL]
StartServer=true
ServerPath=/usr/sbin/mysqld
Name=akonadi
Host=
User=
Password=
Options="UNIX_SOCKET=/home/alvanx/.local/share/akonadi/socket-alvanx/mysql.socket"

[Debug]
Tracer=null


Here's ~/.local/share/akonadi/akonadiserver.error:
Code: Select all
Database process exited unexpectedly during initial connection!
executable: "/usr/bin/postgres"
arguments: ("-w", "-t10", "start", "-D/home/alvanx/.local/share/akonadi/db_data")
stdout: ""
stderr: "/usr/bin/postgres: Ungültige Option -- w
Versuchen Sie »postgres --help« für weitere Informationen.
"
exit code: 1
process error: "Unknown error"
"[
0: akonadiserver(_Z11akBacktracev+0x35) [0x808c9c5]
1: akonadiserver() [0x808cdcc]
2: [0xffffe400]
3: [0xffffe424]
4: /lib/libc.so.6(gsignal+0x4f) [0xb6e668df]
5: /lib/libc.so.6(abort+0x180) [0xb6e68220]
6: /usr/lib/libQtCore.so.4(_Z17qt_message_output9QtMsgTypePKc+0x8a) [0xb7526cda]
7: akonadiserver(_ZN15FileDebugStream9writeDataEPKcx+0xd8) [0x808ef28]
8: /usr/lib/libQtCore.so.4(_ZN9QIODevice5writeEPKcx+0x9b) [0xb75c15bb]
9: /usr/lib/libQtCore.so.4(+0x100dcf) [0xb75cadcf]
10: /usr/lib/libQtCore.so.4(_ZN11QTextStreamD1Ev+0x3e) [0xb75d4c3e]
11: akonadiserver(_ZN18DbConfigPostgresql19startInternalServerEv+0x16f8) [0x81200a8]
12: akonadiserver(_ZN7Akonadi13AkonadiServer20startDatabaseProcessEv+0xef) [0x808f34f]
13: akonadiserver() [0x809221a]
14: akonadiserver(_ZN7Akonadi13AkonadiServer8instanceEv+0x2b) [0x809396b]
15: akonadiserver(main+0x219) [0x80875b9]
16: /lib/libc.so.6(__libc_start_main+0xfe) [0xb6e51c2e]
17: akonadiserver() [0x80872d1]
]
"


I also found the interesting file ~/.local/share/akonadi/db_data/postmaster.log. This one has been repeating since yesterday:
Code: Select all
2011-10-13 17:29:44 CEST   FATAL:  could not create shared memory segment: Invalid argument
2011-10-13 17:29:44 CEST   DETAIL:  Failed system call was shmget(key=5432001, size=36978688, 03600).
2011-10-13 17:29:44 CEST   HINT:  This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parameter.  You can either reduce the request size or reconfigure the kernel with larger SHMMAX.  To reduce the request size (currently 36978688 bytes), reduce PostgreSQL's shared_buffers parameter (currently 4096) and/or its max_connections parameter (currently 104).
   If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for.
   The PostgreSQL documentation contains more information about shared memory configuration.


Any help, anybody? Thanks a lot!

This is akonadi 1.6.0, KDE 4.7.2, Qt 4.7.4, PostgreSQL 9.0.3.
krop
KDE Developer
Posts
26
Karma
2
OS
alvanx wrote:
Here's akonadiserverrc:
Code: Select all
[%General]
Driver=QPSQL

[QPSQL]
StartServer=true
Name=akonadi
Host=/home/alvanx/.local/share/akonadi/socket-alvanx
Options=
ServerPath=/usr/bin/postgres #same results with pg_ctl, I do believe "postgres" was preset though
InitDbPath=/usr/bin/initdb
User=
Password=
Port=5432

[...]


No, it's not the same thing. ServerPath must be pg_ctl. They don't accept the same parameters.

alvanx wrote:I also found the interesting file ~/.local/share/akonadi/db_data/postmaster.log. This one has been repeating since yesterday:
Code: Select all
2011-10-13 17:29:44 CEST   FATAL:  could not create shared memory segment: Invalid argument
2011-10-13 17:29:44 CEST   DETAIL:  Failed system call was shmget(key=5432001, size=36978688, 03600).
2011-10-13 17:29:44 CEST   HINT:  This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parameter.  You can either reduce the request size or reconfigure the kernel with larger SHMMAX.  To reduce the request size (currently 36978688 bytes), reduce PostgreSQL's shared_buffers parameter (currently 4096) and/or its max_connections parameter (currently 104).
   If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for.
   The PostgreSQL documentation contains more information about shared memory configuration.


Any help, anybody? Thanks a lot!

This is akonadi 1.6.0, KDE 4.7.2, Qt 4.7.4, PostgreSQL 9.0.3.


OT: Using Akonadi 1.6.2 would be a good idea.

The error message from postmaster.log is curious, we don't change many settings for the Postgres backend.

open postgresql.conf and check the values of shared_buffers, work_mem and maintenance_work_mem


alvanx
Registered Member
Posts
136
Karma
1
OS
Ok, set it back to pg_ctl.

1.6.0 is what I have from the KDE 4.7 Release repos. I would have to install 1.6.2 from Factory, and I don't know if I would want to make the switch unless absolutely necessary. After all, the current setup had been working for a few months with no problem. But if that should be the only way, I will do it.

Where is postgresql.conf? If you refer to the file in ~/.local/share/akonadi/db_data/, that has the following values:
Code: Select all
shared_buffers = 32MB
#work_mem = 1MB #yes, it is commented, just like the next value
#maintenance_work_mem = 16MB


This file hasn't been changed since August.

Thanks!
krop
KDE Developer
Posts
26
Karma
2
OS
Curious, that value should be low enough.

Anyway, try changing shared_buffers to 24MB


alvanx
Registered Member
Posts
136
Karma
1
OS
Amazing! That did the trick! Thanks a lot.

Btw this might have happened due to the kernel 3.0.6 that I installed on that same day. Maybe something funny with the kernel form openSUSE Tumbleweed.

I'm marking as solved.


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], lockheed, Sogou [Bot], Yahoo [Bot]