We are in the process of migrating this forum. A new space will be available soon. We are sorry for the inconvenience.

CentOS 5.9 a Postgresql błedy, upgrade, shout down...


filo1
14-08-2014, 11:56
Tak, sprawdzam czy mogę w zend frameworku ich użyć, zastanawiam się jeszcze nad jednym czy nie dać do każdej z akcji crona max_execution_time tak aby akcje po czasie były zamykane. Co do dostępu do serwera to takowego nie mogę udzielić, nie mniej mogę wgrać tu każdy z plików potrzebny do analizy to nie problem.

borec
14-08-2014, 09:47
Tak jak piszę no4b, nie możemy wiele więcej Ci pomóc bez dostępu do serwera. Sprawdzałeś te połączenia trwałe?

filo1
13-08-2014, 17:07
Cron wywołuje skrypty przez serwer www, są wykonywane a wyniki są zapisywane do bazy.

Sprawdziłem wywołując komendę ps -e , i zauważyłem sporo procesów, tak jakby one nie były zamykane. (czy procesy powinny być zamykane automatycznie w skryptach podczas ich skończenia czy też trzeba ustawić jakieś czyszczenie procesów ?)

Kod:
0060 ?        00:00:00 crond
10063 ?        00:00:12 php
10086 ?        00:00:00 crond
10091 ?        00:00:05 php
10103 ?        00:00:00 sendmail
10175 ?        00:00:00 sendmail 
11805 ?        00:00:00 crond
11809 ?        00:00:16 php
11852 ?        00:00:00 sendmail
12417 ?        00:00:00 crond
12420 ?        00:00:01 php
12460 ?        00:00:00 sendmail
12546 ?        00:00:00 crond
12551 ?        00:00:22 php
12633 ?        00:00:00 sendmail
12654 ?        00:00:00 crond
12659 ?        00:00:16 php
12734 ?        00:00:00 sendmail
13321 ?        00:00:00 crond
13326 ?        00:00:09 php
13350 ?        00:00:00 pop3-login
13381 ?        00:00:00 crond
13385 ?        00:00:02 php
13407 ?        00:00:00 sendmail
13428 ?        00:00:00 sendmail
14267 ?        00:00:00 crond
14270 ?        00:00:02 php
14293 ?        00:00:00 crond
14296 ?        00:00:12 php
14336 ?        00:00:00 sendmail
14352 ?        00:00:00 sendmail
14426 ?        00:00:00 crond
14429 ?        00:00:15 php
14469 ?        00:00:00 sendmail
14643 ?        00:00:00 crond
14646 ?        00:00:20 php
14686 ?        00:00:00 sendmail
14841 ?        00:00:00 crond
14844 ?        00:00:10 php
14884 ?        00:00:00 sendmail
20293 ?        00:00:00 kworker/0:1
21233 ?        00:00:00 kworker/u8:1
22263 ?        00:00:00 crond
22266 ?        00:00:18 php
22306 ?        00:00:00 sendmail
22691 ?        00:00:00 crond
22694 ?        00:00:16 php
Kod:
             total       used       free     shared    buffers     cached
Mem:         32144       7343      24801          0        554        967
-/+ buffers/cache:       5820      26323
Swap:         1021          0       1021

no4b
13-08-2014, 14:31
Czy mógłby mi ktoś udzielić informacji czytając całość czy config jest prawidłowy i co można jeszcze zrobić aby usprawnić bazę a raczej jej wyłączanie.
Nie da się rzetelnie odpowiedzieć na to pytanie bez porządnej analizy, a tej analizy nie da się zrobić bez dostępu do Twojego serwera.

borec
13-08-2014, 13:25
Stałe połączenia zmniejszą ilość połączeń*z php. Nie napisałeś, czy cron wywołuje skrypty przez serwer www czy z linii poleceń. Ciężko będzie ustalić*cokolwiek więcej nie widząc struktury bazy, zapytań i obciążenia.

filo1
13-08-2014, 13:12
Ok, rozumiem, że mam zrobić tak jak pisano w poradniku:
"Aby zezwolić na używanie stałych połączeń, należy ustawić dyrektywę pgsql.allow_persistent w php.ini na "On" (jest to ustawienie domyślne). Maksymalna liczba jednoczesnych trwałych połączeń może być zdefiniowana przez dyrektywę pgsql.max_persistent w php.ini (domyślnia wartość to -1 oznacza brak ograniczeń). Maksymalna liczba wszystkich połączeń może być ustawiona przez dyrektywę pgsql.max_links w php.ini. "
i dalej muszę zmienić w używanych skryptach spsób połączenia do bazy ?
Kod:
resource pg_pconnect ( string $łańcuch_połączenia [, int $typ_połączenia ] )
Co do połączeń to bardzo często wywoływane są skrypty z crona i następuje zapis do bazy, stąd ta ilość procesów. Czy zmiana parametru wskazanego przez Ciebie spowoduje, że mniej tych procesów będzie ?

Czy mógłby mi ktoś udzielić informacji czytając całość czy config jest prawidłowy i co można jeszcze zrobić aby usprawnić bazę a raczej jej wyłączanie.

borec
13-08-2014, 07:18
Taka ilość procesów bierze się*pewnie z dużej ilości połączeń do bazy. Spróbuj ustawić w php połączenia trwałę, czyli pg_pconnect zamiast pg_connect, powinno to zmniejszyć ilość*połączeń.

filo1
12-08-2014, 13:25
Zauważyłem, że czasami mam straszne nagromadzenie procesów pgsql, sprawdziłem:

Kod:
 (pid 32063 31796 31379 31048 30763 30731 30600 30568 30236 30023 29899 29780 29345 28528 28514 28447 28384 27948 27766 27630 27491 27475 27225 27010 26927 26737 26216 26053 25761 25568 25299 24831 24525 24450 24436 24301 23671 23222 22733 22305 21757 21372 21277 20807 20494 20074 19871 19242 19178 19069 18864 18559 18262 18081 17900 17640 17583 17495 16873 16667 16173 15948 15937 15217 14685 14465 14414 14332 13400 13104 12992 12908 12721 12628 11847 11751 11605 10673 10301 10165 10088 10053 9913 9792 9618 9530 9436 8533 8450 8258 8190 7468 6447 6446 6445 6444 6324 6241 6042 5691 5057 4945 4713 4234 3881 3229 3183 3145 3100 2887 2663 2453 1991 1723 1645 1324 1154 466) is running...
dostaje taki błąd na maila:

PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[08006] [7] could not fork new process for connection: Cannot allocate memory
could not fork new process for connection: Cannot allocate memory


Sprawdziłem na serwerze pamięć w tym samym czasie co status pgsql:
Kod:
total       used       free     shared    buffers     cached
Mem:         32144      11867      20277          0        541       1243
-/+ buffers/cache:      10082      22062
Swap:         1021          0       1021
Zrestartowałem pgsql, czy ktoś mi mógłby powiedzieć czego to jest wina czy może wina jest jakiegoś błedu skryptów który powoduje nasilenie się procesów i zatkanie pamięci, czy też problem z konfiguracją ? choć po informacjach kolegi powyżej i wprowadzonych zmianach serwer się nie zawiesił, wywalił się wyłącznie postgres.

W logach postgresa mam:

Kod:
WARNING:  nonstandard use of escape in a string literal at character 47
HINT:  Use the escape string syntax for escapes, e.g., E'\r\n'.
WARNING:  nonstandard use of \\ in a string literal at character 67
HINT:  Use the escape string syntax for backslashes, e.g., E'\\'.
nonstandard use of escape in a string literal at character 47
HINT:  Use the escape string syntax for escapes, e.g., E'\r\n'.
WARNING:  nonstandard use of \\ in a string literal at character 67
HINT:  Use the escape string syntax for backslashes, e.g., E'\\'.
nonstandard use of escape in a string literal at character 47
HINT:  Use the escape string syntax for escapes, e.g., E'\r\n'.
WARNING:  nonstandard use of \\ in a string literal at character 67
HINT:  Use the escape string syntax for backslashes, e.g., E'\\'.
  TopMemoryContext: 214264 total in 20 blocks; 53744 free (169 chunks); 160520 used
  TopTransactionContext: 8192 total in 1 blocks; 7520 free (2 chunks); 672 used
  Type information cache: 24576 total in 2 blocks; 11888 free (5 chunks); 12688 used
  Prepared Queries: 24576 total in 2 blocks; 15984 free (5 chunks); 8592 used
  Operator lookup cache: 24576 total in 2 blocks; 11888 free (5 chunks); 12688 used
  Operator class cache: 8192 total in 1 blocks; 1680 free (0 chunks); 6512 used
  MessageContext: 4194304 total in 11 blocks; 743416 free (3 chunks); 3450888 used
  smgr relation table: 24576 total in 2 blocks; 5696 free (4 chunks); 18880 used
  TransactionAbortContext: 32768 total in 1 blocks; 32736 free (0 chunks); 32 used
  Portal hash: 8192 total in 1 blocks; 1680 free (0 chunks); 6512 used
  PortalMemory: 8192 total in 1 blocks; 8160 free (1 chunks); 32 used
  Relcache by OID: 24576 total in 2 blocks; 11792 free (3 chunks); 12784 used
  CacheMemoryContext: 2390704 total in 22 blocks; 980240 free (3 chunks); 1410464 used
    CachedPlan: 523264 total in 9 blocks; 56 free (0 chunks); 523208 used
    CachedPlanSource: 15360 total in 4 blocks; 5816 free (4 chunks); 9544 used
   betw_find_by_id_betw: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    id_betw_idx: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    betw_data_pkey: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    cerco_find_by_id_cerco: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    cerco_data_id_pkey: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    locations_id_pkey: 2048 total in 1 blocks; 704 free (0 chunks); 1344 used
    pleko_find_by_url: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    pleko_data_id_pkey: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    gemr_find_by_url: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    gemr_data_id_pkey: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    foro_find_by_id_foro: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    foro_data_id_pkey: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    erop_find_by_url: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    erop_data_id_pkey: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    pedal_find_by_url: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    pedal_data_id_pedal_index: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    pedal_data_id_index: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    pedall_data_id_pkey: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    wopo_find_by_id_wopo 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    wopo_data_id_pkey: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    qwer_find_by_url: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    qwer_data_id_pkey: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    xswt_find_by_id_xswt: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    xswt_data_id_pkey: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    uiop_find_by_id_uiop: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    uiop_data_id_pkey: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    dert_at_data_id_pkey: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    pg_toast_2619_index: 2048 total in 1 blocks; 608 free (0 chunks); 1440 used
    est_types_id_pkey: 2048 total in 1 blocks; 704 free (0 chunks); 1344 used
    man_types_id_pkey: 2048 total in 1 blocks; 704 free (0 chunks); 1344 used
    woman_list_id_pkey: 2048 total in 1 blocks; 704 free (0 chunks); 1344 used
    brand_list_id_pkey: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    beton_data_id_pkey: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    currencies_id_pkey: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    all_data_view: 572416 total in 72 blocks; 8712 free (7 chunks); 563704 used
    CachedPlan: 261120 total in 8 blocks; 55560 free (0 chunks); 205560 used
    CachedPlanSource: 11264 total in 3 blocks; 4688 free (8 chunks); 6576 used
    tyu_send_status_id_pkey: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    tyu_interval_types_id_pkey: 2048 total in 1 blocks; 704 free (0 chunks); 1344 used
    pwall_groups_id_pkey: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    user_pwall_id_pkey: 2048 total in 1 blocks; 704 free (0 chunks); 1344 used
    subscriptions_pwall_id_pkey: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    derop_details_id_pkey: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    derop_id_pkey: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    pg_toast_2618_index: 2048 total in 1 blocks; 608 free (0 chunks); 1440 used
    active_derop_to_send_view: 187392 total in 25 blocks; 3720 free (0 chunks); 183672 used
    CachedPlan: 7168 total in 3 blocks; 2544 free (0 chunks); 4624 used
    CachedPlanSource: 7168 total in 3 blocks; 3496 free (3 chunks); 3672 used
    iop_id_pkey: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    blocked_ip_id_pkey: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    con_id_pkey: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    link_resource_id_pkey: 2048 total in 1 blocks; 704 free (0 chunks); 1344 used
    group_priv_id_pkey: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    gro_id_pkey: 2048 total in 1 blocks; 752 free (0 chunks); 1296 used
    pg_index_indrelid_index: 2048 total in 1 blocks; 704 free (0 chunks); 1344 used
    pg_attrdef_adrelid_adnum_index: 2048 total in 1 blocks; 608 free (0 chunks); 1440 used
    pg_opclass_am_name_nsp_index: 3072 total in 2 blocks; 1496 free (4 chunks); 1576 used
    pg_foreign_data_wrapper_name_index: 3072 total in 2 blocks; 1744 free (3 chunks); 1328 used
    pg_enum_oid_index: 3072 total in 2 blocks; 1744 free (3 chunks); 1328 used
    pg_class_relname_nsp_index: 3072 total in 2 blocks; 1600 free (2 chunks); 1472 used
    pg_foreign_server_oid_index: 3072 total in 2 blocks; 1744 free (3 chunks); 1328 used
    pg_statistic_relid_att_index: 3072 total in 2 blocks; 1600 free (2 chunks); 1472 used
    pg_cast_source_target_index: 3072 total in 2 blocks; 1600 free (2 chunks); 1472 used
    pg_language_name_index: 3072 total in 2 blocks; 1744 free (3 chunks); 1328 used
    pg_authid_oid_index: 3072 total in 2 blocks; 1696 free (2 chunks); 1376 used
    pg_amop_fam_strat_index: 3072 total in 2 blocks; 1384 free (2 chunks); 1688 used
    pg_index_indexrelid_index: 3072 total in 2 blocks; 1696 free (2 chunks); 1376 used
    pg_ts_template_tmplname_index: 3072 total in 2 blocks; 1648 free (2 chunks); 1424 used
    pg_ts_config_map_index: 3072 total in 2 blocks; 1496 free (4 chunks); 1576 used
    pg_opclass_oid_index: 3072 total in 2 blocks; 1696 free (2 chunks); 1376 used
    pg_foreign_data_wrapper_oid_index: 3072 total in 2 blocks; 1744 free (3 chunks); 1328 used
    pg_auth_members_member_role_index: 3072 total in 2 blocks; 1648 free (2 chunks); 1424 used
    pg_ts_dict_oid_index: 3072 total in 2 blocks; 1744 free (3 chunks); 1328 used
    pg_conversion_default_index: 3072 total in 2 blocks; 1432 free (3 chunks); 1640 used
    pg_operator_oprname_l_r_n_index: 3072 total in 2 blocks; 1384 free (2 chunks); 1688 used
    pg_trigger_tgrelid_tgname_index: 3072 total in 2 blocks; 1600 free (2 chunks); 1472 used
    pg_enum_typid_label_index: 3072 total in 2 blocks; 1648 free (2 chunks); 1424 used
    pg_ts_config_oid_index: 3072 total in 2 blocks; 1744 free (3 chunks); 1328 used
    pg_user_mapping_oid_index: 3072 total in 2 blocks; 1744 free (3 chunks); 1328 used
    pg_opfamily_am_name_nsp_index: 3072 total in 2 blocks; 1496 free (4 chunks); 1576 used
    pg_type_oid_index: 3072 total in 2 blocks; 1696 free (2 chunks); 1376 used
    pg_aggregate_fnoid_index: 3072 total in 2 blocks; 1696 free (2 chunks); 1376 used
    pg_constraint_oid_index: 3072 total in 2 blocks; 1744 free (3 chunks); 1328 used
    pg_rewrite_rel_rulename_index: 3072 total in 2 blocks; 1600 free (2 chunks); 1472 used
    pg_ts_parser_prsname_index: 3072 total in 2 blocks; 1648 free (2 chunks); 1424 used
    pg_ts_config_cfgname_index: 3072 total in 2 blocks; 1648 free (2 chunks); 1424 used
    pg_ts_parser_oid_index: 3072 total in 2 blocks; 1744 free (3 chunks); 1328 used
    pg_operator_oid_index: 3072 total in 2 blocks; 1696 free (2 chunks); 1376 used
    pg_namespace_nspname_index: 3072 total in 2 blocks; 1696 free (2 chunks); 1376 used
    pg_ts_template_oid_index: 3072 total in 2 blocks; 1744 free (3 chunks); 1328 used
    pg_amop_opr_fam_index: 3072 total in 2 blocks; 1600 free (2 chunks); 1472 used
    pg_ts_dict_dictname_index: 3072 total in 2 blocks; 1648 free (2 chunks); 1424 used
    pg_auth_members_role_member_index: 3072 total in 2 blocks; 1648 free (2 chunks); 1424 used
    pg_type_typname_nsp_index: 3072 total in 2 blocks; 1648 free (2 chunks); 1424 used
    pg_opfamily_oid_index: 3072 total in 2 blocks; 1744 free (3 chunks); 1328 used
    pg_class_oid_index: 3072 total in 2 blocks; 1696 free (2 chunks); 1376 used
    pg_proc_proname_args_nsp_index: 3072 total in 2 blocks; 1496 free (4 chunks); 1576 used
    pg_attribute_relid_attnum_index: 3072 total in 2 blocks; 1600 free (2 chunks); 1472 used
    pg_proc_oid_index: 3072 total in 2 blocks; 1696 free (2 chunks); 1376 used
    pg_language_oid_index: 3072 total in 2 blocks; 1744 free (3 chunks); 1328 used
    pg_namespace_oid_index: 3072 total in 2 blocks; 1744 free (3 chunks); 1328 used
    pg_database_oid_index: 3072 total in 2 blocks; 1696 free (2 chunks); 1376 used
    pg_amproc_fam_proc_index: 3072 total in 2 blocks; 1384 free (2 chunks); 1688 used
    pg_authid_rolname_index: 3072 total in 2 blocks; 1696 free (2 chunks); 1376 used
    pg_foreign_server_name_index: 3072 total in 2 blocks; 1744 free (3 chunks); 1328 used
    pg_attribute_relid_attnam_index: 3072 total in 2 blocks; 1648 free (2 chunks); 1424 used
    pg_conversion_oid_index: 3072 total in 2 blocks; 1744 free (3 chunks); 1328 used
    pg_user_mapping_user_server_index: 3072 total in 2 blocks; 1648 free (2 chunks); 1424 used
    pg_conversion_name_nsp_index: 3072 total in 2 blocks; 1648 free (2 chunks); 1424 used
  MdSmgr: 8192 total in 1 blocks; 5632 free (0 chunks); 2560 used
  LOCALLOCK hash: 24576 total in 2 blocks; 11872 free (5 chunks); 12704 used
  Timezones: 83472 total in 2 blocks; 3744 free (0 chunks); 79728 used
  ErrorContext: 8192 total in 1 blocks; 8160 free (5 chunks); 32 used
ERROR:  out of memory
DETAIL:  Failed on request of size 16.
STATEMENT:  SELECT "all_data_view".* FROM "all_data_view" WHERE "id_beton_list" = $1 AND "id_erop_list" = $2 AND ("price" <= $3 OR "price" = $4 OR "price" IS NULL) AND ("created_at" > $5 OR "created_at" > $6 OR "created_at" > $7)
LOG:  could not fork new process for connection: Cannot allocate memory
LOG:  could not fork new process for connection: Cannot allocate memory
LOG:  could not fork new process for connection: Cannot allocate memory
LOG:  could not fork new process for connection: Cannot allocate memory
LOG:  could not fork new process for connection: Cannot allocate memory
LOG:  could not fork new process for connection: Cannot allocate memory
LOG:  could not fork new process for connection: Cannot allocate memory
LOG:  could not fork new process for connection: Cannot allocate memory
LOG:  could not fork new process for connection: Cannot allocate memory
LOG:  could not fork new process for connection: Cannot allocate memory
LOG:  could not fork new process for connection: Cannot allocate memory
LOG:  could not fork new process for connection: Cannot allocate memory
WARNING:  nonstandard use of \\ in a string literal at character 67
HINT:  Use the escape string syntax for backslashes, e.g., E'\\'.
WARNING:  nonstandard use of \\ in a string literal at character 67
HINT:  Use the escape string syntax for backslashes, e.g., E'\\'.
LOG:  could not fork new process for connection: Cannot allocate memory
LOG:  could not fork new process for connection: Cannot allocate memory
LOG:  could not fork new process for connection: Cannot allocate memory
WARNING:  nonstandard use of \\ in a string literal at character 67
HINT:  Use the escape string syntax for backslashes, e.g., E'\\'.
WARNING:  nonstandard use of \\ in a string literal at character 67
HINT:  Use the escape string syntax for backslashes, e.g., E'\\'.
WARNING:  nonstandard use of \\ in a string literal at character 67
HINT:  Use the escape string syntax for backslashes, e.g., E'\\'.
TopMemoryContext: 206072 total in 19 blocks; 6152 free (19 chunks); 199920 used
  TopTransactionContext: 8192 total in 1 blocks; 7392 free (0 chunks); 800 used
  Type information cache: 24576 total in 2 blocks; 11888 free (5 chunks); 12688 used
  Operator lookup cache: 24576 total in 2 blocks; 11888 free (5 chunks); 12688 used
  Operator class cache: 8192 total in 1 blocks; 1680 free (0 chunks); 6512 used
  MessageContext: 4194304 total in 10 blocks; 821400 free (6 chunks); 3372904 used
  smgr relation table: 24576 total in 2 blocks; 5696 free (4 chunks); 18880 used
  TransactionAbortContext: 32768 total in 1 blocks; 32736 free (0 chunks); 32 used
  Portal hash: 8192 total in 1 blocks; 1680 free (0 chunks); 6512 used
  PortalMemory: 8192 total in 1 blocks; 7888 free (0 chunks); 304 used
    PortalHeapMemory: 1024 total in 1 blocks; 848 free (0 chunks); 176 used
      ExecutorState: 1066552 total in 8 blocks; 152 free (2 chunks); 1066400 used
        ExprContext: 0 total in 0 blocks; 0 free (0 chunks); 0 used
        ExprContext: 0 total in 0 blocks; 0 free (0 chunks); 0 used
        ExprContext: 0 total in 0 blocks; 0 free (0 chunks); 0 used
        ExprContext: 0 total in 0 blocks; 0 free (0 chunks); 0 used
        ExprContext: 0 total in 0 blocks; 0 free (0 chunks); 0 used
        ExprContext: 0 total in 0 blocks; 0 free (0 chunks); 0 used
LOG:  could not fork new process for connection: Cannot allocate memory
LOG:  could not fork new process for connection: Cannot allocate memory
LOG:  could not fork new process for connection: Cannot allocate memory
LOG:  could not fork new process for connection: Cannot allocate memory
LOG:  could not fork new process for connection: Cannot allocate memory
LOG:  could not fork new process for connection: Cannot allocate memory
LOG:  could not fork new process for connection: Cannot allocate memory
LOG:  could not fork new process for connection: Cannot allocate memory
itp
Będę zobowiązany za informacje.

filo1
06-08-2014, 15:27
Z logów co sprawdziłem, to wychodziło mi na postgresa podczas wykonywania akcji z crona.

Wolałbym jakoś to zoptymalizować, żeby chodziło, bo jak mi wywala się postgres to bez restartu serwera się nie obchodzi, strony www są niedostępne itp. , a tak być nie może.

no4b
06-08-2014, 14:22
Nie ma żadnej gwarancji, że postgres używa "za dużo" pamięci. OOM killer zabija proces z grubsza losowy. Możesz zakazać*ubijania procesu postgresa (oom_adj), wtedy pod topór pójdzie inny proces.

filo1
06-08-2014, 13:22
Czyli tak dla pewności, mam zmienić ustawienie odnośnie pamięci na serwerze w /etc/sysctl.conf.

Jak to nie pomoże to zmienić buffer na 6GB.

Czy jeszcze jakieś zmiany w pliku konfiguracyjnym postgresa oprócz tej ewentualnej zmiany buffora zalecałbyś mi ?

Może dodać też vm.overcommit_ratio = 100 ?

Dziękuję serdecznie z informacje.

borec
06-08-2014, 11:24
Spróbuj tego:
Kod:
sysctl -w vm.overcommit_memory=2
(to samo ustaw w /etc/sysctl.conf).
Jeśli nie pomoże spróbuj zmniejszyć*shared_buffers do 6GB. Innym rozwiązaniem jest serwer z większą ilością*RAM.

filo1
05-08-2014, 18:19
Wynik:

total used free shared buffers cached
Mem: 32144 3581 28563 0 341 967
-/+ buffers/cache: 2272 29872
Swap: 1021 0 1021

konfiguracja:
Kod:

#------------------------------------------------------------------------------
# FILE LOCATIONS
#------------------------------------------------------------------------------

# The default values of these variables are driven from the -D command-line
# option or PGDATA environment variable, represented here as ConfigDir.

data_directory = '/home/base/pgsql/data'		# use data in another directory
					# (change requires restart)
#hba_file = '/home/base/pgsql/data/pg_hba.conf'	# host-based authentication file
					# (change requires restart)
#ident_file = '/home/base/pgsql/data/pg_ident.conf'	# ident configuration file
					# (change requires restart)

# If external_pid_file is not explicitly set, no extra PID file is written.
#external_pid_file = '(none)'		# write an extra PID file
					# (change requires restart)


#------------------------------------------------------------------------------
# CONNECTIONS AND AUTHENTICATION
#------------------------------------------------------------------------------

# - Connection Settings -

listen_addresses = '*'
#listen_addresses = 'localhost'		# what IP address(es) to listen on;
					# comma-separated list of addresses;
					# defaults to 'localhost', '*' = all
					# (change requires restart)
port = 5432				# (change requires restart)
max_connections = 500		# (change requires restart)
# Note:  Increasing max_connections costs ~400 bytes of shared memory per 
# connection slot, plus lock space (see max_locks_per_transaction).
#superuser_reserved_connections = 3	# (change requires restart)
#unix_socket_directory = ''		# (change requires restart)
#unix_socket_group = ''			# (change requires restart)
#unix_socket_permissions = 0777		# begin with 0 to use octal notation
					# (change requires restart)
#bonjour_name = ''			# defaults to the computer name
					# (change requires restart)

# - Security and Authentication -

#authentication_timeout = 1min		# 1s-600s
#ssl = off				# (change requires restart)
#ssl_ciphers = 'ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH'	# allowed SSL ciphers
					# (change requires restart)
#ssl_renegotiation_limit = 512MB	# amount of data between renegotiations
#password_encryption = on
#db_user_namespace = off

# Kerberos and GSSAPI
#krb_server_keyfile = ''
#krb_srvname = 'postgres'		# (Kerberos only)
#krb_caseins_users = off

# - TCP Keepalives -
# see "man 7 tcp" for details

#tcp_keepalives_idle = 0		# TCP_KEEPIDLE, in seconds;
					# 0 selects the system default
#tcp_keepalives_interval = 0		# TCP_KEEPINTVL, in seconds;
					# 0 selects the system default
#tcp_keepalives_count = 0		# TCP_KEEPCNT;
					# 0 selects the system default


#------------------------------------------------------------------------------
# RESOURCE USAGE (except WAL)
#------------------------------------------------------------------------------

# - Memory -

shared_buffers = 8192MB             
					# (change requires restart)
#temp_buffers = 8MB			# min 800kB
#max_prepared_transactions = 0		# zero disables the feature
					# (change requires restart)
# Note:  Increasing max_prepared_transactions costs ~600 bytes of shared memory
# per transaction slot, plus lock space (see max_locks_per_transaction).
# It is not advisable to set max_prepared_transactions nonzero unless you
# actively intend to use prepared transactions.
#work_mem = 1MB				# min 64kB
#maintenance_work_mem = 16MB		# min 1MB
#max_stack_depth = 2MB			# min 100kB

# - Kernel Resource Usage -

#max_files_per_process = 1000		# min 25
					# (change requires restart)
#shared_preload_libraries = ''		# (change requires restart)

# - Cost-Based Vacuum Delay -

#vacuum_cost_delay = 0ms		# 0-100 milliseconds
#vacuum_cost_page_hit = 1		# 0-10000 credits
#vacuum_cost_page_miss = 10		# 0-10000 credits
#vacuum_cost_page_dirty = 20		# 0-10000 credits
#vacuum_cost_limit = 200		# 1-10000 credits

# - Background Writer -

#bgwriter_delay = 200ms			# 10-10000ms between rounds
#bgwriter_lru_maxpages = 100		# 0-1000 max buffers written/round
#bgwriter_lru_multiplier = 2.0		# 0-10.0 multipler on buffers scanned/round

# - Asynchronous Behavior -

#effective_io_concurrency = 1		# 1-1000. 0 disables prefetching


#------------------------------------------------------------------------------
# WRITE AHEAD LOG
#------------------------------------------------------------------------------

# - Settings -

#fsync = on				# turns forced synchronization on or off
#synchronous_commit = on		# immediate fsync at commit
#wal_sync_method = fsync		# the default is the first option 
					# supported by the operating system:
					#   open_datasync
					#   fdatasync (default on Linux)
					#   fsync
					#   fsync_writethrough
					#   open_sync
#full_page_writes = on			# recover from partial page writes
#wal_buffers = 64kB			# min 32kB
					# (change requires restart)
#wal_writer_delay = 200ms		# 1-10000 milliseconds

#commit_delay = 0			# range 0-100000, in microseconds
#commit_siblings = 5			# range 1-1000

# - Checkpoints -

#checkpoint_segments = 3		# in logfile segments, min 1, 16MB each
#checkpoint_timeout = 5min		# range 30s-1h
#checkpoint_completion_target = 0.5	# checkpoint target duration, 0.0 - 1.0
#checkpoint_warning = 30s		# 0 disables

# - Archiving -

#archive_mode = off		# allows archiving to be done
				# (change requires restart)
#archive_command = ''		# command to use to archive a logfile segment
#archive_timeout = 0		# force a logfile segment switch after this
				# number of seconds; 0 disables


#------------------------------------------------------------------------------
# QUERY TUNING
#------------------------------------------------------------------------------

# - Planner Method Configuration -

#enable_bitmapscan = on
#enable_hashagg = on
#enable_hashjoin = on
#enable_indexscan = on
#enable_mergejoin = on
#enable_nestloop = on
#enable_seqscan = on
#enable_sort = on
#enable_tidscan = on

# - Planner Cost Constants -

#seq_page_cost = 1.0			# measured on an arbitrary scale
#random_page_cost = 4.0			# same scale as above
#cpu_tuple_cost = 0.01			# same scale as above
#cpu_index_tuple_cost = 0.005		# same scale as above
#cpu_operator_cost = 0.0025		# same scale as above
#effective_cache_size = 128MB

# - Genetic Query Optimizer -

#geqo = on
#geqo_threshold = 12
#geqo_effort = 5			# range 1-10
#geqo_pool_size = 0			# selects default based on effort
#geqo_generations = 0			# selects default based on effort
#geqo_selection_bias = 2.0		# range 1.5-2.0

# - Other Planner Options -

#default_statistics_target = 100	# range 1-10000
#constraint_exclusion = partition	# on, off, or partition
#cursor_tuple_fraction = 0.1		# range 0.0-1.0
#from_collapse_limit = 8
#join_collapse_limit = 8		# 1 disables collapsing of explicit 
					# JOIN clauses


#------------------------------------------------------------------------------
# ERROR REPORTING AND LOGGING
#------------------------------------------------------------------------------

# - Where to Log -

#log_destination = 'stderr'		# Valid values are combinations of
					# stderr, csvlog, syslog and eventlog,
					# depending on platform.  csvlog
					# requires logging_collector to be on.

# This is used when logging to stderr:
logging_collector = on			# Enable capturing of stderr and csvlog
					# into log files. Required to be on for
					# csvlogs.
					# (change requires restart)

# These are only used if logging_collector is on:
log_directory = 'pg_log'		# directory where log files are written,
					# can be absolute or relative to PGDATA
log_filename = 'postgresql-%a.log'	# log file name pattern,
					# can include strftime() escapes
log_truncate_on_rotation = on		# If on, an existing log file of the
					# same name as the new log file will be
					# truncated rather than appended to.
					# But such truncation only occurs on
					# time-driven rotation, not on restarts
					# or size-driven rotation.  Default is
					# off, meaning append to existing files
					# in all cases.
log_rotation_age = 1d			# Automatic rotation of logfiles will
					# happen after that time.  0 disables.
log_rotation_size = 0			# Automatic rotation of logfiles will 
					# happen after that much log output.
					# 0 disables.

# These are relevant when logging to syslog:
#syslog_facility = 'LOCAL0'
#syslog_ident = 'postgres'

#silent_mode = off			# Run server silently.
					# DO NOT USE without syslog or
					# logging_collector
					# (change requires restart)


# - When to Log -

#client_min_messages = notice		# values in order of decreasing detail:
					#   debug5
					#   debug4
					#   debug3
					#   debug2
					#   debug1
					#   log
					#   notice
					#   warning
					#   error

#log_min_messages = warning		# values in order of decreasing detail:
					#   debug5
					#   debug4
					#   debug3
					#   debug2
					#   debug1
					#   info
					#   notice
					#   warning
					#   error
					#   log
					#   fatal
					#   panic

#log_error_verbosity = default		# terse, default, or verbose messages

#log_min_error_statement = error	# values in order of decreasing detail:
				 	#   debug5
					#   debug4
					#   debug3
					#   debug2
					#   debug1
				 	#   info
					#   notice
					#   warning
					#   error
					#   log
					#   fatal
					#   panic (effectively off)

#log_min_duration_statement = -1	# -1 is disabled, 0 logs all statements
					# and their durations, > 0 logs only
					# statements running at least this number
					# of milliseconds


# - What to Log -

#debug_print_parse = off
#debug_print_rewritten = off
#debug_print_plan = off
#debug_pretty_print = on
#log_checkpoints = off
#log_connections = off
#log_disconnections = off
#log_duration = off
#log_hostname = off
#log_line_prefix = ''			# special values:
					#   %u = user name
					#   %d = database name
					#   %r = remote host and port
					#   %h = remote host
					#   %p = process ID
					#   %t = timestamp without milliseconds
					#   %m = timestamp with milliseconds
					#   %i = command tag
					#   %c = session ID
					#   %l = session line number
					#   %s = session start timestamp
					#   %v = virtual transaction ID
					#   %x = transaction ID (0 if none)
					#   %q = stop here in non-session
					#        processes
					#   %% = '%'
					# e.g. '<%u%%%d> '
#log_lock_waits = off			# log lock waits >= deadlock_timeout
#log_statement = 'none'			# none, ddl, mod, all
#log_temp_files = -1			# log temporary files equal or larger
					# than the specified size in kilobytes;
					# -1 disables, 0 logs all temp files
#log_timezone = unknown			# actually, defaults to TZ environment
					# setting


#------------------------------------------------------------------------------
# RUNTIME STATISTICS
#------------------------------------------------------------------------------

# - Query/Index Statistics Collector -

#track_activities = on
#track_counts = on
#track_functions = none			# none, pl, all
#track_activity_query_size = 1024
#update_process_title = on
#stats_temp_directory = 'pg_stat_tmp'


# - Statistics Monitoring -

#log_parser_stats = off
#log_planner_stats = off
#log_executor_stats = off
#log_statement_stats = off


#------------------------------------------------------------------------------
# AUTOVACUUM PARAMETERS
#------------------------------------------------------------------------------

#autovacuum = on			# Enable autovacuum subprocess?  'on' 
					# requires track_counts to also be on.
#log_autovacuum_min_duration = -1	# -1 disables, 0 logs all actions and
					# their durations, > 0 logs only
					# actions running at least this number
					# of milliseconds.
#autovacuum_max_workers = 3		# max number of autovacuum subprocesses
#autovacuum_naptime = 1min		# time between autovacuum runs
#autovacuum_vacuum_threshold = 50	# min number of row updates before
					# vacuum
#autovacuum_analyze_threshold = 50	# min number of row updates before 
					# analyze
#autovacuum_vacuum_scale_factor = 0.2	# fraction of table size before vacuum
#autovacuum_analyze_scale_factor = 0.1	# fraction of table size before analyze
#autovacuum_freeze_max_age = 200000000	# maximum XID age before forced vacuum
					# (change requires restart)
#autovacuum_vacuum_cost_delay = 20ms	# default vacuum cost delay for
					# autovacuum, in milliseconds;
					# -1 means use vacuum_cost_delay
#autovacuum_vacuum_cost_limit = -1	# default vacuum cost limit for
					# autovacuum, -1 means use
					# vacuum_cost_limit


#------------------------------------------------------------------------------
# CLIENT CONNECTION DEFAULTS
#------------------------------------------------------------------------------

# - Statement Behavior -

#search_path = '"$user",public'		# schema names
#default_tablespace = ''		# a tablespace name, '' uses the default
#temp_tablespaces = ''			# a list of tablespace names, '' uses
					# only default tablespace
#check_function_bodies = on
#default_transaction_isolation = 'read committed'
#default_transaction_read_only = off
#session_replication_role = 'origin'
#statement_timeout = 0			# in milliseconds, 0 is disabled
#vacuum_freeze_min_age = 50000000
#vacuum_freeze_table_age = 150000000
#xmlbinary = 'base64'
#xmloption = 'content'

# - Locale and Formatting -

datestyle = 'iso, mdy'
#intervalstyle = 'postgres'
#timezone = unknown			# actually, defaults to TZ environment
					# setting
#timezone_abbreviations = 'Default'     # Select the set of available time zone
					# abbreviations.  Currently, there are
					#   Default
					#   Australia
					#   India
					# You can create your own file in
					# share/timezonesets/.
#extra_float_digits = 0			# min -15, max 2
#client_encoding = sql_ascii		# actually, defaults to database
					# encoding

# These settings are initialized by initdb, but they can be changed.
lc_messages = 'en_US.UTF-8'			# locale for system error message
					# strings
lc_monetary = 'en_US.UTF-8'			# locale for monetary formatting
lc_numeric = 'en_US.UTF-8'			# locale for number formatting
lc_time = 'en_US.UTF-8'				# locale for time formatting

# default configuration for text search
default_text_search_config = 'pg_catalog.english'

# - Other Defaults -

#dynamic_library_path = '$libdir'
#local_preload_libraries = ''


#------------------------------------------------------------------------------
# LOCK MANAGEMENT
#------------------------------------------------------------------------------

#deadlock_timeout = 1s
#max_locks_per_transaction = 64		# min 10
					# (change requires restart)
# Note:  Each lock table slot uses ~270 bytes of shared memory, and there are
# max_locks_per_transaction * (max_connections + max_prepared_transactions)
# lock table slots.


#------------------------------------------------------------------------------
# VERSION/PLATFORM COMPATIBILITY
#------------------------------------------------------------------------------

# - Previous PostgreSQL Versions -

#add_missing_from = off
#array_nulls = on
#backslash_quote = safe_encoding	# on, off, or safe_encoding
#default_with_oids = off
#escape_string_warning = on
#regex_flavor = advanced		# advanced, extended, or basic
#sql_inheritance = on
#standard_conforming_strings = off
#synchronize_seqscans = on

# - Other Platforms and Clients -

#transform_null_equals = off


#------------------------------------------------------------------------------
# CUSTOMIZED OPTIONS
#------------------------------------------------------------------------------

#custom_variable_classes = ''		# list of custom variable class names

borec
05-08-2014, 17:47
Kod:
Out of memory: Kill process 7509 (postmaster)
Ewidentnie postgres jest winny. Pokaż całą konfigurację postgresa i wynik free -m

filo1
05-08-2014, 13:11
Sprawdziłem i znalazłem takie wpisy, też o braku pamięci. Shared_buffers w Pgsql mam ustawiony na 8GB, całość ramu serwera to 32GB, czyli według dokumentacji pgsql powinno być dobrze.

Aug 4 18:03:03 ns980341 kernel: [] out_of_memory+0x415/0x450
Aug 4 18:03:48 ns980341 kernel: Out of memory: Kill process 7509 (postmaster) score 5 or sacrifice child
Aug 4 18:03:48 ns980341 kernel: Killed process 14963 (postmaster) total-vm:8733364kB, anon-rss:5704kB, file-rss:46020kB

Aug 4 18:03:02 ns980341 kernel: listen_ports.pl invoked oom-killer: gfp_mask=0x84d0, order=0, oom_score_adj=0
Aug 4 18:03:02 ns980341 kernel: listen_ports.pl cpuset=/ mems_allowed=0
Aug 4 18:03:02 ns980341 kernel: CPU: 0 PID: 23355 Comm: listen_ports.pl Tainted: G W 3.10.23-xxxx-std-ipv6-64 #1
Aug 4 18:03:02 ns980341 kernel: Hardware name: System manufacturer System Product Name/P8H77-M, BIOS 1202 06/13/2013
Aug 4 18:03:02 ns980341 kernel: 0000000000000000 ffff880008403688 ffffffff81d38724 ffff880008403708
Aug 4 18:03:02 ns980341 kernel: ffffffff81d328a8 ffff880008403708 ffff8807dedbcf30 ffff8807dedbcf48
Aug 4 18:03:02 ns980341 kernel: 0000000000000206 ffff880000000000 0000000000000206 ffff880008403708
Aug 4 18:03:02 ns980341 kernel: Call Trace:
Aug 4 18:03:02 ns980341 kernel: [] dump_stack+0x19/0x1b
Aug 4 18:03:02 ns980341 kernel: [] dump_header+0x75/0x1b9
Aug 4 18:03:02 ns980341 kernel: [] ? ___ratelimit+0x96/0x110
Aug 4 18:03:02 ns980341 kernel: [] oom_kill_process+0x1bf/0x310
Aug 4 18:03:02 ns980341 kernel: [] ? has_ns_capability_noaudit+0x12/0x20
Aug 4 18:03:03 ns980341 kernel: [] ? has_capability_noaudit+0x12/0x20
Aug 4 18:03:03 ns980341 kernel: [] out_of_memory+0x415/0x450
Aug 4 18:03:03 ns980341 kernel: [] __alloc_pages_nodemask+0x645/0x840
Aug 4 18:03:04 ns980341 kernel: [] alloc_pages_current+0xb7/0x180
Aug 4 18:03:04 ns980341 kernel: [] __get_free_pages+0x9/0x40
Aug 4 18:03:04 ns980341 kernel: [] get_zeroed_page+0x11/0x20
Aug 4 18:03:06 ns980341 kernel: [] __pud_alloc+0x24/0xb0
Aug 4 18:03:07 ns980341 kernel: [] ? vma_gap_callbacks_rotate+0x19/0x20
Aug 4 18:03:07 ns980341 kernel: [] handle_mm_fault+0x175/0x1e0
Aug 4 18:03:07 ns980341 kernel: [] __do_page_fault+0x151/0x4b0
Aug 4 18:03:07 ns980341 kernel: [] ? __vma_link_file+0x43/0x80
Aug 4 18:03:07 ns980341 kernel: [] ? mmap_region+0x14a/0x5c0
Aug 4 18:03:08 ns980341 kernel: [] do_page_fault+0x9/0x10
Aug 4 18:03:08 ns980341 kernel: [] page_fault+0x22/0x30
Aug 4 18:03:08 ns980341 kernel: [] ? __clear_user+0x20/0x50
Aug 4 18:03:08 ns980341 kernel: [] clear_user+0x31/0x40
Aug 4 18:03:09 ns980341 kernel: [] padzero+0x21/0x30
Aug 4 18:03:10 ns980341 kernel: [] load_elf_binary+0x1333/0x1aa0
Aug 4 18:03:11 ns980341 kernel: [] search_binary_handler+0x9d/0x1a0
Aug 4 18:03:12 ns980341 kernel: [] load_script+0x255/0x2a0
Aug 4 18:03:12 ns980341 kernel: [] ? get_user_pages+0x4d/0x50
Aug 4 18:03:12 ns980341 kernel: [] ? copy_strings.isra.31+0xe9/0x300
Aug 4 18:03:12 ns980341 kernel: [] search_binary_handler+0x9d/0x1a0
Aug 4 18:03:12 ns980341 kernel: [] do_execve_common.isra.34+0x5c7/0x6c0
Aug 4 18:03:12 ns980341 kernel: [] do_execve+0x13/0x20
Aug 4 18:03:12 ns980341 kernel: [] SyS_execve+0x38/0x60
Aug 4 18:03:12 ns980341 kernel: [] stub_execve+0x69/0xa0
Aug 4 18:03:12 ns980341 kernel: Mem-Info:
Aug 4 18:03:12 ns980341 kernel: Node 0 DMA per-cpu:
Aug 4 18:03:12 ns980341 kernel: CPU 0: hi: 0, btch: 1 usd: 0
Aug 4 18:03:12 ns980341 kernel: CPU 1: hi: 0, btch: 1 usd: 0
Aug 4 18:03:12 ns980341 kernel: CPU 2: hi: 0, btch: 1 usd: 0
Aug 4 18:03:12 ns980341 kernel: CPU 3: hi: 0, btch: 1 usd: 0
Aug 4 18:03:12 ns980341 kernel: Node 0 DMA32 per-cpu:
Aug 4 18:03:12 ns980341 kernel: CPU 0: hi: 186, btch: 31 usd: 53
Aug 4 18:03:12 ns980341 kernel: CPU 1: hi: 186, btch: 31 usd: 184
Aug 4 18:03:12 ns980341 kernel: CPU 2: hi: 186, btch: 31 usd: 33
Aug 4 18:03:12 ns980341 kernel: CPU 3: hi: 186, btch: 31 usd: 49
Aug 4 18:03:12 ns980341 kernel: Node 0 Normal per-cpu:
Aug 4 18:03:12 ns980341 kernel: CPU 0: hi: 186, btch: 31 usd: 55
Aug 4 18:03:12 ns980341 kernel: CPU 1: hi: 186, btch: 31 usd: 45

borec
05-08-2014, 09:08
Zobacz w /var/log/messages czy nie ma logów out of memory (oom).

filo1
04-08-2014, 23:29
Witajcie,


chciałbym dowiedzieć się czy mając dedyka z centOS 5.9 i bazą danych postgresql 8.4 czy mogę bazę postgresql bez problemowo zaktualizować do 9.3 ?

Pytam dlatego, ponieważ od pewnego czasu baza mi się wyłącza, w logach mam następujące błędy:

WARNING: nonstandard use of \\ in a string literal at character 67
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
LOG: could not receive data from client: Connection timed out
LOG: unexpected EOF on client connection
LOG: could not receive data from client: Connection timed out
LOG: unexpected EOF on client connection
WARNING: nonstandard use of \\ in a string literal at character 67
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
WARNING: nonstandard use of \' in a string literal at character 47
HINT: Use '' to write quotes in strings, or use the escape string syntax (E'...').
WARNING: nonstandard use of escape in a string literal at character 47
HINT: Use the escape string syntax for escapes, e.g., E'\r\n'.
WARNING: nonstandard use of escape in a string literal at character 47
HINT: Use the escape string syntax for escapes, e.g., E'\r\n'.
LOG: background writer process (PID 7412) was terminated by signal 9: Killed
LOG: terminating any other active server processes
WARNING: terminating connection because of crash of another server process
DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
HINT: In a moment you should be able to reconnect to the database and repeat your command.
WARNING: terminating connection because of crash of another server process

shared buffers ustawiłem zgodnie z dokumentacją postgresa, czyli 1/4 dostępnej pamięci serwera.

Czy mógłby ktoś mi tutaj podpowiedzieć ?.

Pozdrawiam.