maximum concurrent connections for ubuntu? - database

i would like to ask how many concurrent connections can ubuntu handle? i heard that xp a maximum of 10 connections.. i will use it as an OS for my small server and will be using mysql on it..

You are probably making all of the tcp connections from one process and hitting the default limit on number of open files per process.
You can confirm that limit with 'ulimit -a' or 'ulimit -n' at a shell prompt.
You could increase that limit with 'ulimit -n ' or setrlimit() as root or by editing /etc/security/limits.conf .
Also see...
Increasing the maximum number of tcp/ip connections in linux
Is there a limit on number of tcp/ip connections between machines on linux?

Related

MS SQL packet size stucked at 590 bytes?

Not so long time ago, I found out my MS SQL server sends data in packets by 590 bytes, fragmenting large responses in about of 30-50 separated packets, as displayed on this Wireshark screenshot.
I tried to change max packet size to 1500, but it has no effect on actual size of tcp packets even after rebooting the server. I tried to carry out some diagnostics and what i found out:
The problem isn't in clients or server's MTU.
There is no devices with MTU smaller than 1500 bytes on packets path.
The ping -l -f 1472 command from server to any client is succesfull.
TCP-connections between server and clients almost always have window size in 1024 bytes.
So, a question - why max packet size does not affect on actual network packets size? im out of ideas about incorrect hardware or OS setup. Probably, the problem in the MS SQL Server itself? Has anyone encountered a similar problem?
The server running Windows Server 2008 R2 Enterprise.
Clients - Windows 7.

What is taking HikariCP so long to create new connections?

I am using version 2.3.7 for Java 6. I have set maximumPoolSize to 200 and connectionTimeout to 30 s. I run into SQLTimeoutExceptions from BaseHikariPool.getConnection in one of our load test cases involving 70 simultaneous users uploading 10 files each. I turned on debug logging and obtained pool stats. So it would seem that the pool isn't being exhausted. Rather, HikariCP takes longer than connectionTimeout to create new connections. How can I debug this part of the process? The underlying data source is SQLServerDataSource version 4.1.
connectionTimeout is the maximum time to wait for obtaining connection from pool.
it is NOT time out for creating connection from data source. there is none.
You may want to consider reducing pool size. begin load testing with minimum and gradually increasing till SqlServer begins to take much longer to create connection.
check about pool size
HTH
It might be because in HikariCP opening a connection is a blocking call (
https://github.com/brettwooldridge/HikariCP/issues/1287)
You might find this option useful com.zaxxer.hikari.blockUntilFilled. With this option connection pool will open minimumIdle connections in parallel during initialization instead of lazy initializing connections.

Postgresql too many clients error on linux server

when i try connect postgresql 9.0 server on linux i get too many clients connected already. I tried increasing max_connections from 100 to 200 and start the server it doest take the max connections. What should i change on the linux server
Eclipse LogCat
Caused by: org.postgresql.util.PSQLException: FATAL: sorry, too many clients already
at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:291)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:108)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
at org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22)
This is a bit of a FAQ and is discussed in Number of Database Connections on the PostgreSQL wiki.
The only way to increase max_connections and persist this value is modifying the postgresql.conf file, so first of all, check if the value has changed (after restarting the server):
show max_connections
If the value DID NOT change, there's something wrong with your procedure (file permissions maybe?). If the value DID change, you might try with a higher value (weird, but might depend on your application connection requirements, OR a connection leak).

understanding data pooling properties

I was wondering what is maxPoolSize for? what is minPoolSize for?
How do I know which property value to use for my database?
EDITED
I am using Oracle 10g, connecting with Hibernate and bitronix on windows OS.
minPoolSize is the minimum number of database connections being opened all the time, even when none of them are used. maxPoolSize on the other hand represents the maximum number of concurrent connection. Now:
Use minPoolSize to always keep few connections opened (even when idle) so that you don't have to wait for establishing a new network connection when request arrives to the system with low load. This is basically a set of connections waiting "for emergency"
maxPoolSize is much more important. If the system is under heavy load and some request tries to open maxPoolSize + 1 connection, the connection pool will refuse, in turns causing the whole request to be discarded. On the other hand setting this parameter to to high value shift the bottleneck from your application to the database server, as it has limited capacity.

EC2 Amazon TCPS question

HI all,
I tried posted on amazon forum for which I didn't get a response. TCPS is needed for my oracle database server to be ssl enabled. Looks like there is no options to open the port 2484 or any other for TCPS. Is this true on amazon instances please confirm.
Thanks,
SR
Unless you're using EC2 security groups, or you have a local firewall (iptables) the port should already be open. Try running iptables -L -v to check for local firewall rules that came with the AMI you are using.
As a point of fact, it's worth noting that by default, ports on any system are "open" until they are blocked by a firewall. "open" effectively means "not blocked." That doesn't mean that they are in use; a system without a firewall can be quite secure if it does not have any programs that are bound/listening to the network, although this is not practical. (The words 'bound' and 'listen' come from the system calls bind(2) and listen(2) which are called by a program to start accepting connections on a given port.)
In short, if there's no firewall in the way, you may not have to do anything at all to "open" a port. Once Oracle has been configured to use TCPS, it will begin using the port automatically.

Resources