Welcome Guest, Not a member yet? Register   Sign In
[solved]site is very slow after switching to hostgator
#1

[eluser]swgj19[/eluser]
If you go to http://www.cradlewebdesign.com/cwd you should see the pages loading very slowly. I used to be with godaddy and moved the exact files over to the new server and now the site is slow. However, I uploaded another site to the same server built in codeigniter and that site is fast. I read that javascript could slow the site down. So I removed the javascript just to see and the site is still slow.

Any suggestions of why this could be?
#2

[eluser]skunkbad[/eluser]
[quote author="Stephen Willis" date="1348532882"]If you go to http://www.cradlewebdesign.com you should see the pages loading very slowly. I used to be with godaddy and moved the exact files over to the new server and now the site is slow. However, I uploaded another site to the same server built in codeigniter and that site is fast. I read that javascript could slow the site down. So I removed the javascript just to see and the site is still slow.

Any suggestions of why this could be?[/quote]

I cant even load the page, and Im on a fiber optic connection.
#3

[eluser]swgj19[/eluser]
I know. If I upload two other websites built in codeigniter on this server, everything is fine and fast. I have tried everything.

1. I removed all javascript.
2. I checked for any calls to unused CSS files.
3. I compared script of working site to this slow one.
4. I checked the config script.

The only difference I noticed was that cradlewebdesign.com is using the newest released version of codeigniter and has the cache directory in applications. I removed this directory.

I have called three different tech guys at hostgator and they all said that the server is working fine.

I checked my account and upped the bandwidth and storage.


I have ran out of options.
#4

[eluser]swgj19[/eluser]
These two sites are sub directories on the same server and are working fine:

http://www.cradlewebdesign.com/blog_wrox/

http://www.cradlewebdesign.com/ci_series/

I added the site that is not working as a sub directory and same result. The site will load, but it takes almost 1 minute to load and 1 minute for every link clicked on.


http://www.cradlewebdesign.com/cwd/
#5

[eluser]skunkbad[/eluser]
Try removing your .htaccess file if you have one. See if the site loads.

Go into your control panel and review the access and error logs for apache. Also check php errors log and MySQL error log if exists.

If that doesn't work, replace the site with a barebones CI install. Work just to get the home page to load. Depending on your actual code, you should be able to debug what is causing the problem. If you can't, you're probably up against changing hosts again.
#6

[eluser]swgj19[/eluser]
I pin pointed where the problem is by disecting every folder. When I upload a fresh install of Codeigniter, everything is perfect. Even when I replace the controllers, models, and views in the fresh install.

Here is where the problem lies:

When I upload the core and libraries directory, that is when the website slows down.

So looking further. In the other scripts, the My_Controller is not extended. In the site that is slow I have a backend and frontend controller in the libraries and extended My_Controller in the core.

I know that this is the problem, I just do not know how to fix it without breaking my auth system.

And why would this work with godaddy, but not hostgator?
#7

[eluser]swgj19[/eluser]
After much agony and debugging, I realized I was wrong. I am very shocked, but Hostgator tech support helped me debug and told me that there was a call going to another host to a database. This is correct because my database was still on godaddy and files were on hostgator.

So I looked in my database script added new db info, switched over db to hostgator and now it works like a charm.

Now, this is also strange, because it is normal to have databases at different locations talking to other locations. So I am not sure why this created a problem, but it was the problem.

Also, think about it. Everytime hostgator server is requesting a file, it has to talk to different locations which will slow it down.

Problem solved.




Theme © iAndrew 2016 - Forum software by © MyBB