0

I have a website/webapp which I developed in JSP/Servlets. On the main the data is collected from the database, so I run the Servlet first to collect data and send it to the JSP. (works fine) The problem is few minutes ago I kept F5 pressed for a while (i.e. refreshed the page quite a few times). Now the server is down and the website displays a Service Temporarily Unavailable message. The bandwidth limit of the account is unlimited, still its saying the account has exceeded the bandwidth limit.

Can anybody tell me how to fix this issue. I know It will be OK in few minutes/hours but I don't want my users to see this message again.

Cheers

AL̲̳I
  • 2,441
  • 4
  • 29
  • 50
  • I don't see any error there... The site is up now. But it was down for about 30 minutes. I think MySQL process went for sleep. Is this some kind of DoS attacked (which I did myself). How to prevent this??? thanks... Do I need some tomcat configuration??? – AL̲̳I Nov 22 '12 at 14:03
  • show what kind of sql query work doing and data available in tables you are accessing ???? – sunleo Nov 22 '12 at 16:57

1 Answers1

0

Set a flag which is set true when the operation starts at first. Reset the flag once the operation is complete

Now if the user tries to leave the page of refresh the page a pop up would come (which can be done with javascript). This would not let the page be refreshed.

If the user confirms the "Are you sure you want to leave the page " alert then stop the currently executing process.

Shamis Shukoor
  • 2,515
  • 5
  • 29
  • 33