Thread: An I/O error occured while sending to the backend.
Hi,
I am running PostgreSQL version 8.3 with this conf[1].
The Operating System is a GNU/Linux x86_64 Kernel 2.6.28-11-server, Distribution: Ubuntu SMP.
Some sysctl I think it's important to relate[2]
Memory and Proc information [3].
The log error is [4].
Aditional information:
I am getting this error using glassfish and postgresql: " Caused by: org.postgresql.util.PSQLException: An I/O error occured while sending to the backend."
Both glassfish and pgsql are localhost. The connection is made using JPA (using localhost to connect)[5].
There's no firewall filtering or blocking it.
I have other environment but CentOS using the same version of pgsql and glassfish with no errors.
What can it be? No errors in pgsql logs.
[1] - postgresql.conf
data_directory = '/var/lib/postgresql/8.3/main'
hba_file = '/etc/postgresql/8.3/main/pg_hba.conf'
ident_file = '/etc/postgresql/8.3/main/pg_ident.conf'
external_pid_file = '/var/run/postgresql/8.3-main.pid'
port = 5432
max_connections = 500
shared_buffers = 32MB
max_fsm_pages = 204800
log_min_messages = error
log_min_error_statement = error
debug_print_parse = off
debug_print_rewritten = off
debug_print_plan = off
debug_pretty_print = off
log_connections = on
log_disconnections = on
log_line_prefix = '%t '
log_statement = 'all'
datestyle = 'iso, mdy'
lc_messages = 'en_US.UTF-8'
lc_monetary = 'en_US.UTF-8'
lc_numeric = 'en_US.UTF-8'
lc_time = 'en_US.UTF-8'
default_text_search_config = 'pg_catalog.english'
[2] sysctl
vm.overcommit_memory = 0
vm.panic_on_oom = 0
vm.oom_kill_allocating_task = 0
vm.oom_dump_tasks = 0
vm.overcommit_ratio = 50
vm.page-cluster = 3
vm.dirty_background_ratio = 40
vm.dirty_ratio = 40
vm.dirty_writeback_centisecs = 500
vm.dirty_expire_centisecs = 3000
vm.nr_pdflush_threads = 2
vm.swappiness = 60
vm.nr_hugepages = 0
vm.hugetlb_shm_group = 0
vm.hugepages_treat_as_movable = 0
vm.nr_overcommit_hugepages = 0
vm.lowmem_reserve_ratio = 256 256 32
vm.drop_caches = 0
vm.min_free_kbytes = 9939
vm.percpu_pagelist_fraction = 0
vm.max_map_count = 65536
vm.laptop_mode = 0
vm.block_dump = 0
vm.vfs_cache_pressure = 100
vm.legacy_va_layout = 0
vm.stat_interval = 1
vm.mmap_min_addr = 65536
kernel.shmmax = 68719476736
kernel.shmmni = 4096
[3] - Proc / Mem Info
Proc 16 cores:
model name : Intel(R) Xeon(R) CPU E5520 @ 2.27GHz
cpu MHz : 2260.929
cache size : 8192 KB
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp l
m constant_tsc arch_perfmon pebs bts rep_good xtopology pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 lahf_lm ida tpr_shadow v
nmi flexpriority ept vpid
bogomips : 4521.85
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
Mem:
total used free shared buffers cached
Mem: 6023960 4969208 1054752 0 156176 3833340
-/+ buffers/cache: 979692 5044268
Swap: 3903784 47752 3856032
[4] Log error:
http://pastebin.com/qjUbaFmM
[5] Connection:
<property name="toplink.jdbc.driver" value="org.postgresql.Driver" />
<property name="toplink.jdbc.url" value="jdbc:postgresql://localhost:5432/hidden" />
<property name="toplink.jdbc.user" value="tcpmexico" />
<property name="toplink.jdbc.password" value="MY_PASSWD" />
Any ideas will be welcome!
Let me know if I need to post more information or if this is not the adequated place for the post.
Thanks
-B
I am running PostgreSQL version 8.3 with this conf[1].
The Operating System is a GNU/Linux x86_64 Kernel 2.6.28-11-server, Distribution: Ubuntu SMP.
Some sysctl I think it's important to relate[2]
Memory and Proc information [3].
The log error is [4].
Aditional information:
I am getting this error using glassfish and postgresql: " Caused by: org.postgresql.util.PSQLException: An I/O error occured while sending to the backend."
Both glassfish and pgsql are localhost. The connection is made using JPA (using localhost to connect)[5].
There's no firewall filtering or blocking it.
I have other environment but CentOS using the same version of pgsql and glassfish with no errors.
What can it be? No errors in pgsql logs.
[1] - postgresql.conf
data_directory = '/var/lib/postgresql/8.3/main'
hba_file = '/etc/postgresql/8.3/main/pg_hba.conf'
ident_file = '/etc/postgresql/8.3/main/pg_ident.conf'
external_pid_file = '/var/run/postgresql/8.3-main.pid'
port = 5432
max_connections = 500
shared_buffers = 32MB
max_fsm_pages = 204800
log_min_messages = error
log_min_error_statement = error
debug_print_parse = off
debug_print_rewritten = off
debug_print_plan = off
debug_pretty_print = off
log_connections = on
log_disconnections = on
log_line_prefix = '%t '
log_statement = 'all'
datestyle = 'iso, mdy'
lc_messages = 'en_US.UTF-8'
lc_monetary = 'en_US.UTF-8'
lc_numeric = 'en_US.UTF-8'
lc_time = 'en_US.UTF-8'
default_text_search_config = 'pg_catalog.english'
[2] sysctl
vm.overcommit_memory = 0
vm.panic_on_oom = 0
vm.oom_kill_allocating_task = 0
vm.oom_dump_tasks = 0
vm.overcommit_ratio = 50
vm.page-cluster = 3
vm.dirty_background_ratio = 40
vm.dirty_ratio = 40
vm.dirty_writeback_centisecs = 500
vm.dirty_expire_centisecs = 3000
vm.nr_pdflush_threads = 2
vm.swappiness = 60
vm.nr_hugepages = 0
vm.hugetlb_shm_group = 0
vm.hugepages_treat_as_movable = 0
vm.nr_overcommit_hugepages = 0
vm.lowmem_reserve_ratio = 256 256 32
vm.drop_caches = 0
vm.min_free_kbytes = 9939
vm.percpu_pagelist_fraction = 0
vm.max_map_count = 65536
vm.laptop_mode = 0
vm.block_dump = 0
vm.vfs_cache_pressure = 100
vm.legacy_va_layout = 0
vm.stat_interval = 1
vm.mmap_min_addr = 65536
kernel.shmmax = 68719476736
kernel.shmmni = 4096
[3] - Proc / Mem Info
Proc 16 cores:
model name : Intel(R) Xeon(R) CPU E5520 @ 2.27GHz
cpu MHz : 2260.929
cache size : 8192 KB
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp l
m constant_tsc arch_perfmon pebs bts rep_good xtopology pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 lahf_lm ida tpr_shadow v
nmi flexpriority ept vpid
bogomips : 4521.85
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
Mem:
total used free shared buffers cached
Mem: 6023960 4969208 1054752 0 156176 3833340
-/+ buffers/cache: 979692 5044268
Swap: 3903784 47752 3856032
[4] Log error:
http://pastebin.com/qjUbaFmM
[5] Connection:
<property name="toplink.jdbc.driver" value="org.postgresql.Driver" />
<property name="toplink.jdbc.url" value="jdbc:postgresql://localhost:5432/hidden" />
<property name="toplink.jdbc.user" value="tcpmexico" />
<property name="toplink.jdbc.password" value="MY_PASSWD" />
Any ideas will be welcome!
Let me know if I need to post more information or if this is not the adequated place for the post.
Thanks
-B
Breno BF wrote: > I am getting this error using glassfish and postgresql: " Caused by: > org.postgresql.util.PSQLException: An I/O error occured while sending to > the backend." Further in the exception log, you'll see: Caused by: java.net.SocketException: Socket closed In other words, the pgsql backend has "hung up" on the client. Most likely the Pg backend terminated for some reason, which you should see in the PostgreSQL logs. > log_min_messages = error > log_min_error_statement = error Turn these down to at least 'info', restart PostgreSQL, and see if you get anything informative in the logs. -- Craig Ringer
Hi,
Craig, since I changed it to info, I could not see nothing in postgres logs when the problem occurs.
log_min_messages = info
log_min_error_statement = info
should I change it to debug?
-B
--
- breno bf
Craig, since I changed it to info, I could not see nothing in postgres logs when the problem occurs.
log_min_messages = info
log_min_error_statement = info
should I change it to debug?
-B
2010/4/6 Craig Ringer <craig@postnewspapers.com.au>
Breno BF wrote:Further in the exception log, you'll see:
> I am getting this error using glassfish and postgresql: " Caused by:
> org.postgresql.util.PSQLException: An I/O error occured while sending to
> the backend."
Caused by: java.net.SocketException: Socket closed
In other words, the pgsql backend has "hung up" on the client. Most
likely the Pg backend terminated for some reason, which you should see
in the PostgreSQL logs.Turn these down to at least 'info', restart PostgreSQL, and see if you
> log_min_messages = error
> log_min_error_statement = error
get anything informative in the logs.
--
Craig Ringer
--
- breno bf
None ?
--
- breno bf
2010/4/6 Breno BF <brenobfernandes@bsd.com.br>
Hi,
Craig, since I changed it to info, I could not see nothing in postgres logs when the problem occurs.
log_min_messages = info
log_min_error_statement = info
should I change it to debug?
-B2010/4/6 Craig Ringer <craig@postnewspapers.com.au>Breno BF wrote:Further in the exception log, you'll see:
> I am getting this error using glassfish and postgresql: " Caused by:
> org.postgresql.util.PSQLException: An I/O error occured while sending to
> the backend."
Caused by: java.net.SocketException: Socket closed
In other words, the pgsql backend has "hung up" on the client. Most
likely the Pg backend terminated for some reason, which you should see
in the PostgreSQL logs.Turn these down to at least 'info', restart PostgreSQL, and see if you
> log_min_messages = error
> log_min_error_statement = error
get anything informative in the logs.
--
Craig Ringer
--
- breno bf
--
- breno bf
On 6/04/2010 11:01 PM, Breno BF wrote: > Hi, > > Craig, since I changed it to info, I could not see nothing in postgres > logs when the problem occurs. > > log_min_messages = info > log_min_error_statement = info > > should I change it to debug? Er... sure. Given that both client and server are on the local host I'd really expect _some_ kind of indication that a backend was going away and leaving the client without a connection. Clearly the connection pool behind JPA expects the connection to still be active, and without any network-layer issues to get in the way, it really must be the backend dying for some reason. -- Craig Ringer