Jump to content

Mysql 'max_User_Connections' Error


rkysh

Recommended Posts

Getting the following error

 

User rkysh already has more than 'max_user_connections' active connections

 

I have closed all the connections in the finally block, then too.

 

Domain : rkysh.heliohost.org

 

 

<%!
  Connection con;
  %>
  <%
  try {
java.util.Date now = new java.util.Date();  
 SimpleDateFormat sdf = new SimpleDateFormat("dd-M-yyyy HH:mm:ss");  
 String sdate=sdf.format(now).toString();
 String ip=request.getRemoteAddr();

  String query = "insert into ip(IP,DATEE) values ('"+ip+"','"+sdate+"')";
String url = "jdbc:mysql://localhost/rkysh_iplog";
Class.forName("com.mysql.jdbc.Driver");
con = DriverManager.getConnection (url, "*****", "******");

Statement stmt = con.createStatement();
int i = stmt.executeUpdate(query);
  }catch(SQLException e) {
out.println(e.getMessage());
}finally{
if (con != null) {
			  try {
				 con.close();
			  } catch (Exception e) {
			  }
			  }}
 
  %>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...