tags:

views:

32

answers:

1

ASP.NET newbie here

I have coded up an ASP.NET website and running on win'08 (remotely hosted). The application queries 11 very large Lucene indexes (each ~100GB). I open IndexSearchers on Page_load() and keep them open and pass them by ref into the query methods based on user entered keywords.

I can RDC in and run the site fine in VS-2008. I can deploy and access it via the web from my desktop.For some bizarre reason, some of my team-mates have trouble running the same site - they can login fine so access is not an issue - however the application just "hangs" when they run some searches.

Any suggestions on where I should be looking? Could this be an issue with multiple searchers querying simultaneously? Any ideas?

A: 

Sounds like locking issues.

You must not hold any resources in web application for longer than need (request).

So I believe you should not hold the Lucene indexes.

Also check the file system permissions for the account that site runs under.

Additionally you should check the Event Logs, you might have some warning or silent errors.

Dmytrii Nagirniak
Now I have my search methods all in a static class and invoke the method something like public static DoSearch (ref IndexSearcher, string query)Instead do you recommend I open an Indexsearcher in DoSearch() and close it?
Mikos
First of all you need to isolate the problem. Make sure the Lucene causes that. But definitely, you need to close the indexes as `Multiple index writers or readers can try to edit the lucene index files at the same time (it's important for the index writer/reader to be closed so it will release the file lock).`
Dmytrii Nagirniak
I did check that and set timers to measure, it doesn't appear the queries take a lot of time ( a few ms to 1 sec) ...but the binding to the gridview seems to take inordinate amount of time.Are there any best practices for working with Lucene on ASP.NET? Here is what I gleaned from searching on SO and Lucene sites:1. Open IndexSearchers on PageLoad() and hold them for duration of user session.2. Open searcher IndexReader = true (my writers are in a separate daemon scheduled task process)3. Use HitsCollector instead of Hits class.4. Move the Indexes onto multiple physical disks (I have 2)
Mikos
do you agree/disagree with above? anything to add? also any projects I can refer to for best practices? thanks for your help!
Mikos
You say the application "hands". Which is usually understood as the application does not respond. But from your last comment it seems that the application is not hanging but rather performs slow when binding data to the grid. So you need to make sure you do not bind millions of records or the data is paged. Usually you should only show 10-100 entries on a web page. If there are more - you should paginate that.
Dmytrii Nagirniak