开发者

Tomcat and Ajax Issues

开发者 https://www.devze.com 2023-01-04 16:17 出处:网络
Hello, it\'s really the first time for me to post. I\'am encountering a problem with my Web Apps and cannot find any answers on the web.

Hello, it's really the first time for me to post.

I'am encountering a problem with my Web Apps and cannot find any answers on the web.

  • My problem is that i have a开发者_Go百科 Java Web App that works on parallel with tomcat and apache using mod_jk.

  • Everything works fine, but after one day of running in tomcat, the Ajax request i do with Jquery dosn't come back with the data. I'm using SQL Base (phpMyAdmin).

  • I'm sending a request to the servlet in charge of the sql using Jquery Ajax but i never get the response. Wierd thing is that it works for a day and then stop the next one (i must than reload my WebApps to make it work again).

Could you gentle developpers give me a hint or two please ? :)


I think whenever you are opening the connection to take data from database then probably you are not closing those connections.And every time your application is creating new connection with database without closing old one.As sql has limited number of connections so after one day or after some time your application is not able to connect with your database.So you are not getting data from database. And when you are reloading your application that time you are restarting tomcat so that time your all connections with database are being closed.So next time again you are able get data from database. So check whether you are closing database connections properly after every transaction or not.Might be this is your problem.


Have you looked at any error messages in the log files? Especially, do you know if the corresponding Servlet gets called at all, or is the request blocked by apache / tomcat?

0

精彩评论

暂无评论...
验证码 换一张
取 消