Forgot password? | Forgot username? | Register

Restarting the emuweb interface?

Restarting the emuweb interface?

Background:
I'm developing a middleware component for extracting specific sets of records from KE to XML which will then be transformed and loaded up to another repository.


As I work my way through the necessary queries to pull the data, some have been freezing the http interface (see a separate thread on HTTP interface and joins).

So I am trying to unfreeze the http interface.
I was told to run 'emuweb restart' from the server commandline.
It stops and starts the service, but gives an error that texxmlserver is probably already running.

I try to 'kill' the texxmlserver process but it refuses to die and the http interface continues to be locked up.

Somewhere between 3 to 12 hours later, the texxmlserver does eventually die and I can run 'emuweb restart' and can successfuly run queries through the http interface.

(I've done this twice now with a lot of extra shenanigans thrown in, so the events I describe above might or might not reflect the reality of what is going on. It's a condensation of what I belive are the pertinent actions.)


Is there a way to quickly and reliably stop and restart the http interface? It seems that once it's frozen, it becomes unresponsive to the restart command/script and the system command kill.


Thanks in advance,

Alan Harbaugh
Internet Development
Winterthur Museum

Edited by: - 01-Jan-70 09:00:00

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Restarting the emuweb interface?

Hi Alan,

Yeah the emuweb texxmlserver interface is pretty pokey. Plenty of things freak it out and cause it to freeze/run at massive CPU utilisation forever. I've seen the 'texxmlserver is probably already running' error but I don't know the exact cause, could be that the texxmlserver.pid file isn't cleared correctly on a hang or maybe you are running mutiple copies of Emuweb on one server which can cause that prob.

I've found the best way to stop these hangs from happening is to add a timeout limit to the texxmlserver.conf file. When the timeout limit is reached the texxmlserver process will be killed so no more hangs. Adjust the limit to however long you desire (it's in seconds).

Texxmlserver.conf file location:
/your_emu_database_DIR/etc/texxmlserver.conf

Add the following lines (30 second timeout in example):
timeout=30
timeouthandler=error

Search the Emu application help (press F1) for 'timeout' and it'll give you a brief rundown on the setting and the associated timeouthandler setting. Check out the 'matchlimit' setting too to limit the number of records returned, might be useful to you.

Later,
Simon

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Restarting the emuweb interface?

Hello Alan,

When a request is submitted to texxmlserver it passes the query part of the request on to the texserver process attached to that texxmlserver. texserver then evaluates the query and passes the results back which are then passed back to the requester. That is:

requester ---> texxmlserver ---> texserver (evaluates query) ---> texxmlserver ---> requester

The "freezing" you mention occurs when texserver takes some time to process a complex query.

The texxmlserver process(es) are controlled by a parent texxmlserver process that is in charge of starting and terminating the child processes (using "ps -ef | egrep texxml" will show one process owned by PID 1, this is the parent process). You can find out the PID of the parent process by entering "emuweb status".

When "emuweb restart" is run the parent process is terminated which in turn kills all the child processes. Killing the texxmlserver process may not terminate the associated texserver processes if it is busy (processing a query). Once the texserver process finishes processing the query it will terminate.

If you get the error:

Could not bind to port. Is texxmlserver already running?

It means one of two things:

1) A texxmlserver child process is still running. You can determine this by entering "ps -ef | grep texxml" and noting the PID. You can then just kill it usign the PID. This should be extremely rare (I have not seen it happen for a number of years).

2) You are running an old version of TexAPI (which contains texxmlserver). In late 2004 a bug was fixed that caused the above error message to appear even if all texmxmlserver processes were killed. It was not until all associated texserver processes finished that texxmlserver could be restarted.

From your description it would seem that the second point is the most likely. Particularly since you cannot restart emuweb for 3-12 hours (this may be the time taken for your "join" query to conclude in texserver). In this case I would recommend contacting KE Support and getting the latest version of the TexAPI package installed.

Regards

bern.
Bernard Marshall
KE Software
Melbourne, Australia

Bernard Marshall (Axiell Melbourne)
useravatar
Offline
43 Posts
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Restarting the emuweb interface?

Excellent! I did as you suggested and it successfuly timed out (although I didn't use the join query...). So hopefully, these 12 hour processings can be avoided. Unfortunately, a matchlimit won't be useful for what we want right now.


You say: "Yeah the emuweb texxmlserver interface is pretty pokey. Plenty of things freak it out and cause it to freeze/run at massive CPU utilisation forever. "

Is this a recommendation to go at this in a different way? TexAPI?


You mention the Emu application help. I am unfamiliar with this. How is it accessed? Where is it? Is it in the KEmu program?

With many thanks,
Alan

Alan Harbaugh
03-07-2008 12:58 AM     Alert
Thanks Bern! Great information, it's going to be a great help.

I'll certainly check with Support about getting the latest TexAPI on.
Though, (and I don't mean this as a slam) I put these questions into Support a couple days ago and haven't heard from them. Don't know the workload/staffing but I kind of expected some response from them by now.

Again thanks for the information as I try to work my way into understanding this system.

Alan

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Restarting the emuweb interface?

Unfortunately, the timeout in the config is not working for this problem. The process is freezing/continuing unacceptable too long.

I am able to kill the parent process but the child is more persistent...

Thanks to both Simon and Bern!

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Restarting the emuweb interface?

Hi Alan,

Apologies for the late response but I thought I should mention that we received your support request on Monday night at approximately 9:30 pm which of course is outside our working hours. Tuesday was Canada day and a public holiday and thus we were unable to respond.

Someone from the Vancouver office will be contacting you shortly to organise the installation of the latest TexAPI.
Regards,

Nick Margiolakis
KE Software (Australia)

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Restarting the emuweb interface?

Posted By Nick Margiolakis on 03-07-2008 4:58 AM
Hi Alan,

Apologies for the late response but I thought I should mention that we received your support request on Monday night at approximately 9:30 pm which of course is outside our working hours. Tuesday was Canada day and a public holiday and thus we were unable to respond.

Someone from the Vancouver office will be contacting you shortly to organise the installation of the latest TexAPI.

Hope you had a happy holiday!
I understand situations like this happen, which is why I said I wasn't sure what the staff situation was.

Chris has installed and started up the current TexAPI... unfortunately the same results.

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Restarting the emuweb interface?

Hello Alan,

If you are still having problems terminating texxmlserver can you please log this with EMu support so that the issue can be tracked and resolved.

Thanks

bern.
Bernard Marshall
KE Software
Melbourne, Australia

Bernard Marshall (Axiell Melbourne)
useravatar
Offline
43 Posts
Administrator has disabled public posting. Please login or register in order to proceed.
There are 0 guests and 0 other users also viewing this topic