Welcome Guest, Not a member yet? Register   Sign In
Database Connects Only Sometimes
#1

[eluser]Unknown[/eluser]
I'm creating my own photo gallery using CI and an API using the REST Client Library (http://philsturgeon.co.uk/news/2009/06/R...odeIgniter). To upload the photos from my photo library (using Adobe Photoshop Lightroom) to the gallery, I connect to my API.

The problem is that, sometimes the database connects successfully and the queries are all executed without error. Then, sometimes it seems to stop after the Database is initialized. When it happens, it doesn't execute the function in the controller. I can't figure out why, because it seems like it is failing silently and does not send any response (so the request times out). It seems to connect successfully, since no errors are logged. (Logging is set to level 4 in my config file.) I don't auto load the DB, I load it in the constructor of my controller.

I haven't seen the problem occur on simpler functions that just query the DB. The controller method that the problem is occurring in, accepts an uploaded image, creates two re-sized versions and inserts a row into my DB. I know dealing with images can use CPU resources, but the images are only about 1MB.

This is what the log shows:

Code:
DEBUG - 2011-07-22 02:53:04 --> Config Class Initialized
DEBUG - 2011-07-22 02:53:05 --> Hooks Class Initialized
DEBUG - 2011-07-22 02:53:05 --> Utf8 Class Initialized
DEBUG - 2011-07-22 02:53:05 --> UTF-8 Support Enabled
DEBUG - 2011-07-22 02:53:05 --> URI Class Initialized
DEBUG - 2011-07-22 02:53:05 --> Router Class Initialized
DEBUG - 2011-07-22 02:53:05 --> Output Class Initialized
DEBUG - 2011-07-22 02:53:05 --> Security Class Initialized
DEBUG - 2011-07-22 02:53:05 --> Input Class Initialized
DEBUG - 2011-07-22 02:53:05 --> Global POST and COOKIE data sanitized
DEBUG - 2011-07-22 02:53:05 --> Language Class Initialized
DEBUG - 2011-07-22 02:53:05 --> Loader Class Initialized
DEBUG - 2011-07-22 02:53:05 --> Config file loaded: application/config/wm.php
DEBUG - 2011-07-22 02:53:05 --> Helper loaded: url_helper
DEBUG - 2011-07-22 02:53:05 --> Helper loaded: date_helper
DEBUG - 2011-07-22 02:53:05 --> Controller Class Initialized
DEBUG - 2011-07-22 02:53:05 --> Config file loaded: application/config/rest.php
DEBUG - 2011-07-22 02:53:05 --> Helper loaded: inflector_helper
DEBUG - 2011-07-22 02:53:05 --> Model Class Initialized
DEBUG - 2011-07-22 02:53:05 --> Model Class Initialized
DEBUG - 2011-07-22 02:53:05 --> Database Driver Class Initialized

My dev. environment is as follows:
I have xampp with MySQL 5 installed on one computer and on another computer I have my photo library. So, I'm testng my project across my LAN.

I haven't been able to find anything on Google after hours of searching. I did find this post, [http://ellislab.com/forums/viewthread/125347/#620000] that seems a little similar to my problem, though I am not dealing with any remote databases.

The only thing I can think of is something on the MySQL side, or there's some sort of timeout period.

Anybody out there who can help? Thanks.


Messages In This Thread
Database Connects Only Sometimes - by El Forum - 07-22-2011, 03:31 PM
Database Connects Only Sometimes - by El Forum - 07-24-2011, 06:04 AM
Database Connects Only Sometimes - by El Forum - 07-24-2011, 11:45 AM
Database Connects Only Sometimes - by El Forum - 07-26-2011, 03:51 PM



Theme © iAndrew 2016 - Forum software by © MyBB