Sphinx server shutting off / stopping on its own - sphinx

Has anyone else had problems with a sphinx search just stopping or turning off on its own? After a short period of time Sphinx will shut down and I'll have to go back and restart it.
Can something trigger Sphinx to turn off?

Firstly look in searchd.log!
That is the most likly place to have useful information.

Related

How do I continue where I left off in Spring Batch?

So I wrote an ItemReader. When this app is run from the command line again I want to continue reading from where I left off. How do I do that?
I've added spring-task. It seems to track certain things. Does it help with this?
Everything I have read online seems to be talking about restarting the job after a failure. I don't think I have any use for that. I've added all of my stuff into the ExecutionContext. Should I use the JobRepository and start looking around for the last successful execution?

POSTGRES: pg_cancel_backend does not always work (reason behind it)

I'm currenty using postgres as my database engine, which i've hooked up to a web application.
I'm have noticed on some occasions that there are locks that get accumlated in the database, mainly AccessSharedLocks (when running the query: select * from pg_locks).
One thing I have noticed is that to cancel a process that is acquiring a lock you can use pg_cancel_backend(pid), but sometime i realise that this doesnt always work!! And i'm curious to know why. Is it that this function sends a SIGINT to the database to shut it down gracefully? meaning that it wont shut it down immediately?
There is pg_terminate_backend, but i prefer to not use this.
Any advice on why pg_cancel_backend intermittently works (or at least some explanation) would be grateful).
thanks.
pg_cancel_backend and pg_terminate_backend send signals to the process.
The backend checks ever so often for pending interrupts, but it can happen that execution is in a place where it takes a while until that happens.
Canceling a query won't get rid of the locks until the transaction is closed.

Pause quartz trigger from database

I'm using SpringMVC, Quartz 2.2.1 with Mysql 5.6.15.
I have a scheduled task that use some web resources. Now the resources are not available, so I need to ignore the task temporarily, waiting for them to be back.
I think changing the code is too much for such a minor issue. While knowing it's not recommended, I guess altering the Quartz Mysql database is the best way to go.
I find this answer suggesting :
UPDATE QRTZ_TRIGGERS SET TRIGGER_STATE = "PAUSED"
the answer is 7 years ago and the replyer not responding, I tried to find the doc saying so, but no luck. I wanna know :
Is this the right way to do, without any side-effect?
What does QRTZ_PAUSED_TRIGGER_GRPS table for? Do I need to alter it?

syslog-ng hungup using afmongo

i'm using syslog-ng to send data to mongo
after a while the process hung up. tcpdump shows no data outgoing.
debuggint syslog-ng, i found Destination queue full, dropping message;... appears several times, then back to normal. for last time it never come back.
using kill -1 $PID can solve it. but the reason is unkown, i'm trying to figure it out.
if anyone have an idea?
There are a couple of things which can cause this, but it's hard to tell without more information, I'd suggest asking on the syslog-ng mailing list too, as it's very likely I'd ask for a bit of debugging info there, which isn't all that suitable on stackoverflow.
Nevertheless, there's one known case of deadlock that I know of in afmongodb, which isn't fixed in 3.3.4, for that, there's a fix available here. From your description, I'm not sure this would help (the destination queue full stuff is interesting, by the way), but from what you describe, this is my best bet.
Hope it helps!

Windows Services troubleshooting, recovery setting?

Right now i have some sort of services application on windows server 2003 for inputting data from devices into database.
Sometimes the services fail due to data error or anything else (database connection problem, internet connection down, etc) which i have to restart the services, right now the solution i provide for this problem was a simple batch command using NET START/STOP command that scheduled every 1 hour.
I then take a look at recovery tab on service properties, there was an option to restart the services, which i want to know was how to test it? Such as, how Windows know the services was failed? And the most important was how to know that services successfully restarted when failure occur (based on recovery setting)?
PS: I didn't have access to the code
Thanks
The service console's auto restart kicks in when a service crashes from an unhandled exception. (Some part of your code throws an exception, but nothing catches it, and it bubbles all the way up and out of the main function.)
If you have control over the code, it might be better to put in some try/catch blocks around the areas that tend to cause problems and handle errors more gracefully. You could also put a try/catch around the main entry point of the application, to catch and try to handle any unhandled exceptions from the code.
If you can't control the code, you can test the auto service recovery by forcing one of these errors to occur. If you service crashes in the event of a connection problem, you can force this by unplugging the network cable on the computer.
The easiest way to test the recovery options is to kill your service's process from the task manager. Windows will detect it and run the First Failure recovery option. Subsequent kills will test the Second Failure and Subsequent Failure options. The Event Log will note the exit and the actions taken.
Depending on your environment and your service this may or may not be a viable option for you as you are killing the service.
You can restore it back to an earlier point in time, Restoring Surface doesn’t change your personal files, but it might remove recently installed apps and drivers.
1.Swipe in from the right edge of the screen, and then tap Search.
(If you're using a mouse, point to the upper-right corner of the screen, move the mouse pointer down, then click Search.)
2.Enter Control Panel in the search box, and tap or click Control Panel.
3.Enter Recovery in the Control Panel search box, and then tap or click Recovery.
4.Tap or click Open System Restore, and then follow the instructions.