Advertisement
Guest User

Untitled

a guest
May 17th, 2012
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.21 KB | None | 0 0
  1. templates/default/conf/server.xml (the working one)
  2.  
  3. <Resource name="${nuxeo.db.commonds}" auth="Container" type="javax.sql.DataSource"
  4. maxActive="100" maxIdle="1" maxWait="10000" driverClassName="${nuxeo.db.driver}"
  5. url="${nuxeo.db.jdbc.url}?tcpKeepAlive=true" validationQuery="${nuxeo.db.validationQuery}"
  6. username="${nuxeo.db.user}" password="${nuxeo.db.password}" />
  7.  
  8. templates/postgresql/nxserver/config/default-repository-config.xml (not working)
  9.  
  10. <xa-datasource>org.postgresql.xa.PGXADataSource</xa-datasource>
  11. <property name="ServerName">${nuxeo.db.host}</property>
  12. <property name="PortNumber">${nuxeo.db.port}</property>
  13. <property name="DatabaseName">${nuxeo.db.name}</property>
  14. <property name="User">${nuxeo.db.user}</property>
  15. <property name="Password">${nuxeo.db.password}</property>
  16. <property name="TcpKeepAlive">true</property>
  17. <check-valid-connection-sql>;</check-valid-connection-sql>
  18. <track-connection-by-tx/>
  19.  
  20.  
  21. As we can see by tcp dump the only keep alive packet is referred only to the server.xml datasource. For the repository datasource TcpKeepAlive property has no effect.
  22.  
  23. [root@prmpas10 ~]# netstat -ntp | grep 5432
  24. tcp 0 0 213.175.5.78:58346 213.175.5.104:5432 ESTABLISHED 32476/java  default-repository-config datasource
  25. tcp 0 0 213.175.5.78:58336 213.175.5.104:5432 ESTABLISHED 32476/java  server.xml datasource
  26. tcp 0 0 213.175.5.78:58343 213.175.5.104:5432 ESTABLISHED 32476/java  default-repository-config datasource
  27.  
  28. the only keepalive packet (set to 30 seconds) is from 213.175.5.78 (this host) port 58336 and 213.175.5.106 port 5432 (postgres host)
  29.  
  30. # tcpdump -i eth0 port 5432 -nn
  31. tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
  32. listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
  33. 11:43:38.450021 IP 213.175.5.78.58336 > 213.175.5.104.5432: Flags [.], ack 715944432, win 501, options [nop,nop,TS val 3095301429 ecr 1315924691], length 0
  34. 11:43:38.452905 IP 213.175.5.104.5432 > 213.175.5.78.58336: Flags [.], ack 1, win 501, options [nop,nop,TS val 1315954693 ecr 3095241467], length 0
  35. 11:44:08.452023 IP 213.175.5.78.58336 > 213.175.5.104.5432: Flags [.], ack 1, win 501, options [nop,nop,TS val 3095331431 ecr 1315954693], length 0
  36. 11:44:08.454896 IP 213.175.5.104.5432 > 213.175.5.78.58336: Flags [.], ack 1, win 501, options [nop,nop,TS val 1315984694 ecr 3095241467], length 0
  37. 11:44:38.454018 IP 213.175.5.78.58336 > 213.175.5.104.5432: Flags [.], ack 1, win 501, options [nop,nop,TS val 3095361433 ecr 1315984694], length 0
  38. 11:44:38.456866 IP 213.175.5.104.5432 > 213.175.5.78.58336: Flags [.], ack 1, win 501, options [nop,nop,TS val 1316014696 ecr 3095241467], length 0
  39. 11:45:08.456019 IP 213.175.5.78.58336 > 213.175.5.104.5432: Flags [.], ack 1, win 501, options [nop,nop,TS val 3095391435 ecr 1316014696], length 0
  40. 11:45:08.458886 IP 213.175.5.104.5432 > 213.175.5.78.58336: Flags [.], ack 1, win 501, options [nop,nop,TS val 1316044698 ecr 3095241467], length 0
  41. ^C
  42. 8 packets captured
  43. 8 packets received by filter
  44. 0 packets dropped by kernel
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement