Jump to content

Recommended Posts

  • Replies 31
  • Created
  • Last Reply

Top Posters In This Topic

Posted (edited)

i uploaded new war file

username: rajesha1

war file name:FINTECH-PROJECTS.war

deploy this



error:javax.servlet.ServletException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: User rajesha1_food already has more than 'max_user_connections' active connections

 

 

 

 

 

 

 

only one user name rajesha1_food exist then why the above error

Edited by rohanawaw
Posted

The error is most commonly caused by people not closing their mysql connections after the query has completely. I've noticed this is especially bad in java. Keep in mind java was never really designed or intended to run in a multiuser environment, so unless you tell your code explicitly to close the connections java is going to assume it has the whole server to itself.

 

You had a whopping 12 mysqlconnections just sleeping open. Most of which hadn't sent a single byte of data in HOURS. I've closed them all for you.

 

Perhaps this will help https://stackoverflow.com/questions/2225221/closing-database-connections-in-java

Posted
6721869 rajesha1_food   localhost:46542 rajesha1_onlinebooks    Sleep   2765   NULL
6721870 rajesha1_food localhost:46544 rajesha1_onlinebooks Sleep 2765 NULL
6721884 rajesha1_food localhost:46666 rajesha1_onlinebooks Sleep 2759 NULL
6721885 rajesha1_food localhost:46668 rajesha1_onlinebooks Sleep 2759 NULL
2765 is the number of seconds since the last data was transferred so about 46 minutes.
Posted (edited)

there are lots of places where connection is closed after the query

only 2 or 3 places are there where connection is not closed

 

at rajesha1_food connection is closed after the query

 

there are other error which i need to see before uploading new war file

 

iam from india, so i have to wait for ur reply for night

 

i dont know if ur still awake

 

 

its still giving maxconnection error

just open the connection today or if u somehow close the connection how can i open it from my cpanel

Edited by rohanawaw
Posted

java.io.FileNotFoundException: ..\home\rajesha1\stories\post.jpg (No such file or directory)

 

how to get access to my user directory, what is the full path

Posted

Well, first of all in linux you use slashes not backslashes like in windows, so it path would be like /home/rajesha1/stories/post.jpg

 

Second I checked and even if the slashes were facing the correct direction there is no file named post.jpg in that directory.

Posted (edited)

is this the correct path iam using ..\home\rajesha1\stories\post.jpg

so in this way of relative path i can get access to my user directory

 

is this confirmed (dont bother about slashes,tell me the relative path is correct or not )

Edited by rohanawaw
Posted

No, that is not the relative path. The absolute path is

/home/rajesha1/stories/post.jpg
The relative path would be something ridiculous like

../../../../../../../../../../home/rajesha1/stories/post.jpg
tl;dr use absolute, not relative

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...