PDA

View Full Version : Mindtouch host (DREAM) hangs on every page



walterg
09-13-2007, 01:31 PM
Hi,

I'm triying to test the source version of DekiWiki, on a WinXP platform.
So far I've succeded in setting everything up and starting and completing the online installation script, but nothing more.

After installation I've tried to upload a few small images to the home page, and the DekiWiki stopped working. After this, I am not even able to load the home page, it goes on timeout with this message:

Fatal error: Maximum execution time of 30 seconds exceeded in E:\server\deki-hayes\Deki_Wiki_1.8.1d_Hayes_source\web\includes\d ream.php on line 280

I'm using Mysql 5.0
Apache 2.2
PHP 5.2.4
and the Deki-Hayes source code.

The error seems (at least to me) in the Dream server (the one listening on 8081) IT tries to do something and it hungs.

The log gives just these lines:

2007-09-13 13:37:11,982 [5872] ERROR MindTouch.Dream.DreamFeatureChain - handler for GET:local://d2562a2c559545d6a8b4b9788ffb7c46/deki/pages/29?dream.out.format=php&dream.in.host=deki-hayes&dream.in.origin=127.0.0.1 failed()
System.TimeoutException: async operation timed out
2007-09-13 13:37:11,982 [5872] DEBUG MindTouch.Dream.DreamMessage - Response: Internal Error(async operation timed out

I've tried a bit of debugging, for example by reading from the URL:

http://localhost:8081/host/services

But I get "403 insufficient access privileges". I've even put username and pwd in the URL but to no avail.

I've tried the VMWare version which looked very promising and I'd like very much to install it on a real server. Now I', trying on my notebook before switching to a RedHat for production, but since I'm stuck I don't know how to test the wiki.

Thanx

walterg
09-14-2007, 09:18 PM
It seems that the timeout happens at line 280 of

web\includes\dream.php

after a bit of debuggin it seems that the above php tries to call a service on the Mindtouch dream HTTP server, and the URL is

http://deki-hayes/@api/deki/pages/29?dream.out.format=php&dream.in.host=deki-hayes&dream.in.origin=127.0.0.1

Can anyone help me finding what I'm doing wrong?
Thanx

Walter

walterg
09-17-2007, 10:23 AM
Out of desperation I've tried again by reinstalling it.
I've dropped the DB, erased the configu files which are built by the install process, and restarted the on line install:

everything works until I decide to upload an image to the home page. Then, the mindtouch host (the .net app) hangs, goes timeout, and from then on the site is stuck, I won't even be able to reload the home page.

No idea, nothing?
{PLease, please, help... :) DekiWiki looks very nice, but I want to install it from scratch on my RedHat server in the future, without VMWare.

Thanx

MaxM
09-17-2007, 05:33 PM
Walter,
this is a pretty strange problem that I haven't heard anyone run into yet. The mindtouch.host.exe process freezes when you upload a file? Can you confirm that by pointing your browser directly to the api with http://hostname/@api/deki/@about before and after a file upload? If you've been uploading images, try uploading a non-image type to skip to thumbnail generation.

Stop by the irc channel at irc.freenode.net #opengarden and we can troubleshoot this further.

Max

walterg
09-18-2007, 05:34 PM
Hi,thank you for answering!!

the problem seems in the image upload process, that;'s what I thought. I've updated ImageMagick to the last version available on line, but it's always the same..

Anyway, as you suggested, I've tried with a text doc. It WORKS!! The file gets uploaded and the site can be browsed.
So the problem is with the images: I have enough space for the thumbnails, btw the images wer 300x200 pixels, something like this..

My version of ImageMagick is ImageMagick-6.3.5-Q16

With pictures, the pattern is always the same:

Each time I try an upload an image it hangs, and from then on the site is unavailable, unusable.. the mindtouch host works (spits out a few lines of debug) then goes timeout.. . I have to drop the DB, reinstall, copy the variuos files, and then I am able to, at least, log in again and try something..

BTW. I always try to puload images to the HomePage, so it makes sense that the site is unavailable, because the server looks at the home page, sees that the pictures have no thymbnails, tries to generate thumbnails, and hangs.. forever.. :) Any idea how to overcome this? Where should I look?

Thanks a lot
Walter

Here is the @api about:
MindTouch, Inc. 2006 (more) (blueprint)
Configuration
banned-words = string? : Comma separated list of banned words
ps2pdf-path = string? : Path to ps2pdf tool (default: /usr/bin/ps2pdf)
html2ps-path = string? : Path to html2ps tool (default: /usr/bin/html2ps)
max-image-size = int? : Maximum supported image size in bytes or 0 for no limit (default: 0).
imagemagick-identify-path = string : Path to ImageMagick identify tool
imagemagick-convert-path = string : Path to ImageMagick converter tool
deki-resources-path = string? : Path to Deki resources folder (default: %deki-path%/resources)
authtoken-salt = string : Private key used to generate unique auth tokens
admin-db-password = string : Database administrator password.
admin-db-user = string? : Database administrator user name (default: root).
deki-sitename = string? : Site name (default: Deki Wiki).
deki-language = string? : Site language (default: en-US).
deki-path = string : Deki installation folder
deki-db-options = string : Optional connection string parameters
deki-db-password = string : Password for database user.
deki-db-user = string? : Database user name (default: wikiuser).
deki-db-catalog = string? : Database table name (default: wikidb).
deki-db-port = int? : Database port (default: 3306).
deki-db-server = string? : Database host name (default: localhost).
apikey = string? : Key to access protected features of the service.
uri.self = uri : Uri for current service (provided by Host).
autosave = double? : Time interval in seconds for automatic state save (only applies to services with state).
no-log = void? : When present, service does not create a log sub-service at /@log.


Anyway

daibach
10-12-2007, 08:11 AM
Hi, I appear to have run into the exact same problem. Although I installed dekiwiki on one server which worked fantastic, once I moved it to another server I had some problems with uploads. Managed to fix normal files by changing the collation on the database but I get the exact same problem as above with images.

Any page I upload an image too appears to freeze the dekihost service. After it times out I can still access the rest of the wiki except for the page I uploaded the image too, unless I delete the database record for the file from the attachment table. Once that's gone I can access the page again.

I monitored the server while uploading an image and found the following:
* DekiService writes the image file to the attachment\ID directory
* DekiService starts the ImageMagick Identify program
* Identify.exe process started and accessed the correct image.
* DekiService started reading the image file but then tries to read the file 10 times after receiving an "End of file" result from the read process.
* Identify.exe process doesn't close down.

This all results in the following:
* DekiService will time out on requests for the page with the uploaded image.
* DekiService will work for the rest of the wiki.

The only way to get that page working again is:
* Delete the record for that image from the attachment database table.
Or
* Kill the identify.exe process (had to use PSKill (http://www.microsoft.com/technet/sysinternals/utilities/pskill.mspx)), which appears to cause dekiwiki to treat the image as a normal file attachment.

So something is going wrong either with identifying the image (I've tried several different types) or handling it after.

SteveB
10-28-2007, 06:37 PM
I just fixed an issue which might have been what you were seeing. Under certain conditions, deki wiki would hang when invoking external processes. This also happened with the imagemagick extension.

The fix is already in public/dekiwki/1.8.2 and will be available via updateWiki.sh in the coming week.

daibach
10-29-2007, 09:19 AM
Awesome, thanks Steve. I love dekiwiki and this was the one thing that stopped me from showing it off more in my organisation.

Cheers :)

daibach
11-02-2007, 09:01 AM
Bad news, still suffering with the problem. Is the fix that you mention in the new 1.8.2b release? I've just gone through the upgrade process and everything is working as it should (apart from a small php/fastCgi fix for getAllHeaders) but I'm still getting service hangs on Mono calling other programs with the processes not appearing to finish.

SteveB
11-02-2007, 07:08 PM
Yep, the fix was in 1.8.2b. :(

Can you provide more information about your installation, like version of mono, imagemagick, php, OS, etc. Thanks.

daibach
11-05-2007, 08:05 AM
Here is the version information on the two boxes I've replicated the problem on.

Server 1:
Windows 2003 Server SP2
MySql 5.0.45 (Community)
Mono 1.2.5.1
PHP 5.2.4

Server 2:
Windows 2000 SP4
MySql 5.0.45 (Community)
Mono 1.2.5.1
PHP 5.2.4

I've tried the following versions of ImageMagick, making sure to uninstall properly first before installing the next version.

6.3.5-9-Q16
6.3.5-10-Q16

6.3.6-1-Q16
6.3.6-2-Q16
6.3.6-7-Q16

On Server 1, if I switch to .NET 2.0 everything starts working.

SteveB
11-07-2007, 10:36 PM
Thanks. I wish I knew what's causing the problem. Can you email at steveb {at} mindtouch {dot} com? I'd like to send you a test app to see if I can replicate the issue in a more confined domain. Thanks.

daibach
11-08-2007, 07:43 AM
I've sent you an Email Steve, thanks again :)

daibach
02-28-2008, 09:19 AM
Hi,

I'm hoping SteveB will spot this thread :)

Still struggling along with this issue which I've avoided solving with an upgrade and switching to .NET since I want to help keep the Dekiwiki/Mono/Windows combination as an option.

I wanted to know if the bug with Mono had been filed with them and is there any way to track it. So at least I could keep an eye on it and maybe help out somehow with fixing/testing.

Thanks