You are here: Foswiki>Tasks Web>Item10664 (25 Apr 2011, SvenDowideit)Edit Attach

Item10664: Having trouble getting MongoDB to notice newly created webs - i.e. it seems I have to explicitly load a web before the DB gets created for it

pencil
Priority: Normal
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: MongoDBPlugin
Branches:
Reported By: SvenDowideit
Waiting For:
Last Change By: SvenDowideit
I'd love a less vague description, but I'm assuming that you mean you create a new web via the Func api?

and I'm hoping that your listeners are functioning correctly....

-- SvenDowideit - 21 Apr 2011

When I use the ManagingWebs UI to create a web, Eg. Sandbox.TestWeb, it times out and fcgid kills the process (returns error 500 to the browser).

Watching top, I can see memory usage grow and grow up to 1GB before the fcgid timeout kills it off.

My LocalSite.cfg contained the following:
$Foswiki::cfg{Store}{Implementation} = 'Foswiki::Store::RcsWrap';
$Foswiki::cfg{Store}{SearchAlgorithm} = 'Foswiki::Store::SearchAlgorithms::Forking';
$Foswiki::cfg{Store}{EgrepCmd} = '/bin/grep -E %CS{|-i}% %DET{|-l}% -H -- %TOKEN|U% %FILES|F%';
$Foswiki::cfg{Store}{FgrepCmd} = '/bin/grep -F %CS{|-i}% %DET{|-l}% -H -- %TOKEN|U% %FILES|F%';
$Foswiki::cfg{Store}{QueryAlgorithm} = 'Foswiki::Store::QueryAlgorithms::BruteForce';
$Foswiki::cfg{Store}{PrefsBackend} = 'Foswiki::Prefs::TopicRAM';
$Foswiki::cfg{Store}{Listeners} = {'Foswiki::Plugins::MongoDBPlugin::Listener' => 1};
$Foswiki::cfg{Plugins}{MongoDBPlugin}{Enabled} = 1;
$Foswiki::cfg{Plugins}{MongoDBPlugin}{Module} = 'Foswiki::Plugins::MongoDBPlugin';
$Foswiki::cfg{MongoDBPlugin}{host} = 'a.wiki.org:27017,b.wiki.org:27017,c.wiki.org:27017';
$Foswiki::cfg{MongoDBPlugin}{auto_reconnect} = 1;
$Foswiki::cfg{MongoDBPlugin}{auto_connect} = 1;
$Foswiki::cfg{MongoDBPlugin}{timeout} = 20000;
$Foswiki::cfg{MongoDBPlugin}{find_master} = 1;
$Foswiki::cfg{MongoDBPlugin}{w} = 1;
$Foswiki::cfg{MongoDBPlugin}{wtimeout} = 1000;
$Foswiki::cfg{MongoDBPlugin}{username} = '';
$Foswiki::cfg{MongoDBPlugin}{password} = '';
$Foswiki::cfg{Plugins}{MongoDBPlugin}{ExperimentalCode} = 1;

Please note the "use of unitialised..." errors in the apache error log.

-- PaulHarvey - 22 Apr 2011

Hrm. After setting Search & QueryAlgorith to MongODB (rather than Forking/!BruteForce), the create web function now works. The memory usage is still somewhat concerning, but I might also throw in:
  • I was hitting 'back' and re-submitting the create new web page, so maybe it was struggling in the code which generates an CSRF validation error?
  • What kind of search happens when you create a new web - maybe this occurs on our configuration & webs with Forking/BruteForce because they are too slow?

-- PaulHarvey - 22 Apr 2011

Anyway, apart from the above glitch, it seems my problem was caused by incorrect listener config. It works now.

-- PaulHarvey - 22 Apr 2011

so can we close it? wrt csrf, no idea, er, nope, noidea

-- SvenDowideit - 23 Apr 2011

Let's close it

-- PaulHarvey - 23 Apr 2011
 

ItemTemplate edit

Summary Having trouble getting MongoDB to notice newly created webs - i.e. it seems I have to explicitly load a web before the DB gets created for it
ReportedBy SvenDowideit
Codebase
SVN Range
AppliesTo Extension
Component MongoDBPlugin
Priority Normal
CurrentState Closed
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
I Attachment Action Size Date Who Comment
error.loglog error.log manage 11 K 22 Apr 2011 - 07:20 PaulHarvey apache error log
Topic revision: r5 - 25 Apr 2011, SvenDowideit
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy