z_module_indexer eats up memory

19 views
Skip to first unread message

Amiramix

unread,
Oct 4, 2012, 1:50:04 PM10/4/12
to zotonic-d...@googlegroups.com
gen server z_module_indexer eats the most memory in my Erlang VM. What's the purpose of this module? The source says it has something to do with creating index of content on pages. I've disabled module called Search Queries and I am not using any search functionality, why then this server may be running?

On a similar note, is the module Search Queries required by the admin section? After disabling this module I am now receiving errors on the console:
17:44:44.533 [info] Unknown search query {latest,[{cat,"person"}]}
[]

17:44:44.534 [info] Unknown search query {latest,[{cat,"location"}]}
[]

17:44:44.535 [info] Unknown search query {latest,[{cat,"event"}]}
[]

17:44:44.536 [info] Unknown search query {latest,[{cat,"media"}]}
[]

I understand they are to show widgets on the Dashboard. Is there any way of disabling those widgets in the Dashboard?


Marc Worrell

unread,
Oct 4, 2012, 2:09:46 PM10/4/12
to zotonic-d...@googlegroups.com
Hi,

The z_module_indexer maintains an index of which templates, actions, scamps, filters etc are available on your system.
For this it crawls your site, site's modules and zotonic modules.
So, it is quite essential in the functioning of Zotonic :)

When you enable the mod_development then it will ping the z_module_indexer periodically to check for any changes.
On systems with many sites this might actually slow down the sever a bit.

The search queries module, mod_search, provides almost all searches for the rest of the system.
When you disable it you won't be able to do a lot of searches.

That is also why you see those notes about unknown search queries.

The dashboard can't be changed at the moment.
I would love to have a configurable dashboard!

- Marc

Amiramix

unread,
Oct 4, 2012, 5:33:43 PM10/4/12
to zotonic-d...@googlegroups.com
Ah, right. So they are both essential. We really need a list of modules that are essential if not for the admin section then for the whole Zotonic installation. But I still don't understand why z_module_indexer works as a server, e.g. does it check if any of the actions, scomps or filters have changed? Is it polling the resources periodically? Or does it index a module when it is reloaded?

Marc Worrell

unread,
Oct 4, 2012, 6:20:19 PM10/4/12
to zotonic-d...@googlegroups.com
Hi,

The z_module_indexer reindexes when modules are changed.
Or on a timer tick from the development module.

- Marc

Amiramix

unread,
Oct 5, 2012, 5:42:54 AM10/5/12
to zotonic-d...@googlegroups.com
Great, thanks for the explanation. Is there any way of making this process smaller? On my system it eats up over 5MB, it is the biggest process in the whole VM, despite the fact that I have just a handful of modules switched on.
Reply all
Reply to author
Forward
0 new messages