Hi all.
I would like to know what is the best configuration to make b4j/pool/mysql ready to receive many simultaneous accesses/querys (around 500k to 2m day).
I need know the best configuration for this 2 servers.
Server 1
10 x COREIntel Xeon E5 (10 x 2.20 GHz)
256 GB RAM
Server 2
10 x COREIntel Xeon E5 (10 x 2.20 GHz)
60 GB RAM
this is the configuration I am currently using for servers with low traffic.
I am closing all the used resultset and connections. (Example)
but even so, doing it right I would have many simultaneous hits and queries.
I've also set up mysql.
I need to have as much stability as possible.
there are no other systems / sites on the vps, so using as much ram would be no problem. the question is how to configure the pool / b4j to take better advantage of the 256 available ram.
thx all.
I would like to know what is the best configuration to make b4j/pool/mysql ready to receive many simultaneous accesses/querys (around 500k to 2m day).
I need know the best configuration for this 2 servers.
Server 1
10 x COREIntel Xeon E5 (10 x 2.20 GHz)
256 GB RAM
Server 2
10 x COREIntel Xeon E5 (10 x 2.20 GHz)
60 GB RAM
this is the configuration I am currently using for servers with low traffic.
B4X:
pool.Initialize("com.mysql.cj.jdbc.Driver", "jdbc:mysql://localhost/website?characterEncoding=utf8&autoReconnect=true&useTimezone=true&serverTimezone=UTC", user, pass)
jo = pool
jo.RunMethod("setMinPoolSize", Array(0))
jo.RunMethod("setMaxPoolSize", Array(5000))
jo.RunMethod("setMaxIdleTime", Array As Object(60))
jo.RunMethod("setMaxStatements", Array As Object(1))
jo.RunMethod("setNumHelperThreads", Array As Object(10))
jo.RunMethod("setCheckoutTimeout", Array As Object(60000))
jo.RunMethod("setMaxIdleTimeExcessConnections", Array As Object(60))
I am closing all the used resultset and connections. (Example)
B4X:
Private l As List : l.Initialize
Dim con As SQL = Main.pool.GetConnection
Dim rs As ResultSet = con.ExecQuery2("SELECT * ..........", Array As Object(req.GetParameter("....")))
Do While rs.NextRow
l.Add(rs.GetString("...."))
Loop
rs.Close 'HERE
con.Close 'HERE
but even so, doing it right I would have many simultaneous hits and queries.
I've also set up mysql.
B4X:
SET GLOBAL max_connections = 100000;
I need to have as much stability as possible.
there are no other systems / sites on the vps, so using as much ram would be no problem. the question is how to configure the pool / b4j to take better advantage of the 256 available ram.
thx all.