Performance
attiks - November 8, 2008 - 16:28
| Project: | Zina |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
When I do a search on artist/title I get a time-out, I guess the problem is that I have a big (10k) mp3 collection, is there anyway to speed up the search?

#1
Make sure your cache directory is writeable (and exists -- I had a problem with CVS not including an empty folder). Then make sure your caches are generated the first time (by doing it in the "Settings"--cron will keep it updated) .
#2
Started it now, fingers crossed .... time out
I checked the database, but apparently there are no tables for zina, is this correct?
#3
I installed the tables in the database and started 'Populate the database', it's still running but the table keeps growing, so it looks OK.
If there's a database, are all searches restricted to the database (i guess so, but just checking).
Update: Indexing completed after a while, all files are in the database, but search isn't working :/
#4
Actually, searches use the flat file caches. Currently, the database is used for ratings, stats, storing descriptions (if filesystem not writeable) & id3 tags cache. You don't have to populate the database. As dirs/files are accessed/played, the entries will be made.
#5
What happens if the cache doesn't exist, does it do a search on the complete collection without using any cache?
#6
If the cache doesn't exist and it's enabled, it should create it the first time. You can also manually create it from the admin menu. From then on, Drupal's cron will keep it updated.
#7
I think that's my problem, creating the cache is taking too long, I had a quick look at the code and there should be a gz file in the cache folder, but it's never saved to disk, I always get a time-out :/ (ps time-out in php.ini is set to 600 seconds)
So for the moment no search for me
#8
Can you post the error message (mainly I'm interested in "line XXX" so I can see where it's buggin' out.
Also, do you get an error message in the apache error_log?
#9
Error message (function zina_scandir), i changed time-out back to 120.
Fatal error: Maximum execution time of 120 seconds exceeded in C:\sites\drupal6\sites\all\modules\zina\zina\index.php on line 3030
Nothing in the logs, only the get for the page with status 200.
#10
Eventually, I'm going to use some sort of batch processing for the caches, but until then, could you try setting the timeout to 0 (zero) and seeing if it ever completes (or throughs a different error message)?
#11
Changed the time-out to zero (using @set_time_limit(0);) and all looks OK, search is working as well as random :p
#12