• Post Reply Bookmark Topic Watch Topic
  • New Topic

external mysqldump command hanging JSF app?

 
Jamie Williams
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I've got a problem with doing a mysqldump. After a user does some actions with my JSF application I want a backup of certain tables to be made. This backup could be several hundred MBs, and may need to be done a few times in a short time (1/2 hr - 1 hr). I don't want the user to be waiting for ages for the backup to be finished, I want to have it running in the background.

I'm executing my command like this:

But it seems to just be hanging. The output file doesn't get created at all.

I thought that when a Process object is no longer accessible it continues running 'asynchronously' (not quite sure what that means in this context) instead of being stopped. So how come it's not doing anything?

Then I tried


And it didn't do anything either! I eventually killed the process which returned the error message above.

Could this have something to do with the fact that my dump command is 4000+ characters? If it is, does anyone know how to get around this? I have been doing this same command in PHP on the same box for months. Also, the nature of the program is that this dump command will continue to get longer and longer as time goes by.

btw this is running in Tomcat 5.5 on a Linux box.
 
Jamie Williams
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Never mind, fixed it
For those who are looking for a solution to the same problem, you can't use the redirection exactly the same way as the command line. Instead replace your redirection with '-r filename':


becomes
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jamie, thanks for the courtesy.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!