Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sat Nov 12, 2011 1:47 pm 
Offline
Newbie

Joined: Sat Nov 12, 2011 11:34 am
Posts: 4
Website: http://www.jasperespejo.com/
Location: Philippines
Almost there with my LEMP server. I built it using the tutorial here.

Finally was able to install a test wp site here.

My only problem now is that uploading a zip file of a theme with filesize 800Kb never completes. The browser stops always at 77%. I tried uploading other themes or image files and the same thing happens. It gets stuck at loading at some point and never completes. Using Firefox to upload media files, WordPress gives me "IO error."

Nginx site Error log:

2011/11/12 23:01:04 [error] 5465#0: *29 client intended to send too large body: 1247250 bytes,

Uploading files via sftp also stops after a while, with this message:

Network error: Software caused connection abort.

I have already increased the client_max_body_size in my nginx conf and upload_max_filesize in php.ini both 64M. Also restarted both services and checked phpinfo to make sure the upload size is really updated.

I'm not really a programmer. Just a web designer who would like to host my site in nginx so I'm really stumped. Any expert advice is greatly appreciated.

Thanks.

_________________
Jasper Espejo
www.jasperespejo.com


Top
   
 Post subject:
PostPosted: Sat Nov 12, 2011 2:23 pm 
Offline
Senior Member

Joined: Wed Dec 01, 2010 10:39 am
Posts: 71
Website: http://www.pannix.net
Location: Belgium
I am the other newbie here, but I find it strange that a file of 800 kB stops uploading after 77%, but that the nginx error mentions 1.2 MB.

Never encountered this error, but can offer you 2 work arounds, no solutions, to get you going:
1. Unzip the theme on your computer and upload directory to your site with sftp (individual files and folders instead of 1 big file).
2. Log in on your server with ssh, go to themes directory, and download theme with wget.

I regularly upload files up to 10 MB to my server. Never experienced the "Network error: Software caused connection abort. "


Top
   
 Post subject:
PostPosted: Sat Nov 12, 2011 2:40 pm 
Offline
Newbie

Joined: Sat Nov 12, 2011 11:34 am
Posts: 4
Website: http://www.jasperespejo.com/
Location: Philippines
My mistake with the nginx error. It must have been the other image file I tried to upload but stopped too. That was 1.7Mb. I already tried your suggestion #1 but even with sftp some files do not completely upload. I notice that those files are bigger than 1MB.

Nginx or PHP configs should not have an effect on sftp right?

Maybe I will just do a clean install and start from scratch :cry:

_________________
Jasper Espejo

www.jasperespejo.com


Top
   
 Post subject:
PostPosted: Sun Nov 13, 2011 9:29 am 
Offline
Senior Newbie

Joined: Fri Jan 28, 2011 10:21 am
Posts: 17
Location: Kiev, Ukraine
If you really did not touch firewall and sysctl, then are you sure that you PC is in OK condition? Maybe you have some local problem that prevents you from uploading? Try another browser for example and check your PC for viruses.


Top
   
 Post subject:
PostPosted: Tue Nov 15, 2011 10:04 am 
Offline
Senior Member

Joined: Sun Mar 28, 2010 2:43 pm
Posts: 76
Website: http://tomakefast.com
Location: Texas
Did you ever figure this out?

Once I ran into a problem uploading a large WordPress import (XML?) and "client_max_body_size 5M;" solved my problem. Did you remember to restart NginX after changing the config file? Check your error logs to see if there's any useful information there.

I'm not sure what OS you have at home but I often use "sshfs" when uploading themes. So when you turn on your PC, automatically mount all your Linodes into subdirectories with sshfs, like /joes_linode /franks_linode etc.

Once you have this set up (time well spent) you can drag and drop themes from your PC to your Linode, or save themes, photos, whatever off the web right to your Linode, or drag a theme from "joes" Linode to "franks" Linode. Huge time saver, I haven't used something like "Filezilla" in ages.

In Linux you can bookmark your remote theme directories if you're lazy--they're always just one click away!

Sorry I don't know the answer to your "big files" question--maybe try an NginX forum. If you get desperate, the author (Igor) is very helpful.

_________________
PHP Development @ Tomakefast


Top
   
 Post subject:
PostPosted: Fri Nov 18, 2011 1:26 pm 
Offline
Senior Newbie

Joined: Fri Nov 18, 2011 1:02 pm
Posts: 9
Website: http://www.saigonnezumi.com
Yahoo Messenger: amerasiankevin
AOL: amerasiankevin
Location: HCMC, Vietnam
ilokano wrote:
My mistake with the nginx error. It must have been the other image file I tried to upload but stopped too. That was 1.7Mb. I already tried your suggestion #1 but even with sftp some files do not completely upload. I notice that those files are bigger than 1MB.

Nginx or PHP configs should not have an effect on sftp right?

Maybe I will just do a clean install and start from scratch :cry:


I keep client_max_body_size (nginx.conf), upload_max_filesize (php.ini), and post_max_size (php.ini) at 10M.

I used to increase when I got the same error. I took a look at my error.log and realized that the memory limit was being exceeded. A fix online stated it was a WordPress issue, not Nginx. Just add the following to wp-config.php.

Code:
/** Wordpress Memory Limit */
define('WP_MEMORY_LIMIT', '128M');


I set it to 128M but I probably just need 64M.

Hope this helps.

_________________
One of the very few Americans who travelled the world and can communicate in 7 languages.


Top
   
 Post subject:
PostPosted: Fri Nov 18, 2011 1:34 pm 
Offline
Senior Newbie

Joined: Sat Mar 29, 2008 10:52 pm
Posts: 18
Please don't define the WP memory limit higher then the limit it can actually use (10M in your case), this'll just lead to a whole new level of hell when WP tries allocating more memory then it can and starts throwing pretty exception errors at your face just by looking at the admin panel :)


Top
   
 Post subject:
PostPosted: Fri Nov 18, 2011 1:50 pm 
Offline
Senior Newbie

Joined: Fri Nov 18, 2011 1:02 pm
Posts: 9
Website: http://www.saigonnezumi.com
Yahoo Messenger: amerasiankevin
AOL: amerasiankevin
Location: HCMC, Vietnam
Marius wrote:
Please don't define the WP memory limit higher then the limit it can actually use (10M in your case), this'll just lead to a whole new level of hell when WP tries allocating more memory then it can and starts throwing pretty exception errors at your face just by looking at the admin panel :)


Ok, duly noted. :)

_________________
One of the very few Americans who travelled the world and can communicate in 7 languages.


Top
   
 Post subject:
PostPosted: Sun Nov 20, 2011 6:38 am 
Offline
Newbie

Joined: Sat Nov 12, 2011 11:34 am
Posts: 4
Website: http://www.jasperespejo.com/
Location: Philippines
ferodynamics wrote:
I'm not sure what OS you have at home but I often use "sshfs" when uploading themes. So when you turn on your PC, automatically mount all your Linodes into subdirectories with sshfs, like /joes_linode /franks_linode etc.

Once you have this set up (time well spent) you can drag and drop themes from your PC to your Linode, or save themes, photos, whatever off the web right to your Linode, or drag a theme from "joes" Linode to "franks" Linode. Huge time saver, I haven't used something like "Filezilla" in ages.


Thanks for the message. I already did a clean install using a perfect ubuntu + nginx setup from howtoforge and that seemed to fix things. I am curious about sshfs so I googled about it and found a version called Dokan for windows. I think I will try that.

_________________
Jasper Espejo

www.jasperespejo.com


Top
   
 Post subject:
PostPosted: Sun Nov 20, 2011 7:11 am 
Offline
Newbie

Joined: Sat Nov 12, 2011 11:34 am
Posts: 4
Website: http://www.jasperespejo.com/
Location: Philippines
Thanks for all the messages.

In the end I did a clean install. I never really found out the cause of the problem. Could have been something in my setup, my filezilla not playing well with sftp connection, or my firewall (server and local). But I did a clean install with instructions from howtoforge ubuntu 11.10 + nginx + ispconfig3 and things have been running fine for several days now.

Here is my live site finally migrated to Linode nginx:

http://www.jasperespejo.com/

My question now is what's your suggestion for optimized php-fpm conf. My current setup:


pm = dynamic
pm.max_children = 10
pm.start_servers = 3
pm.min_spare_servers = 1
pm.max_spare_servers = 5

...this is for my website I linked above.

I would like to squeeze a few more WP sites I own into this server (Linode 768). Maybe 3-4 sites on this server with low traffic of only around 1,000-2,000 visitors per month. Would my server be able to handle the load?

_________________
Jasper Espejo

www.jasperespejo.com


Top
   
 Post subject:
PostPosted: Tue Nov 22, 2011 7:27 pm 
Offline
Senior Member

Joined: Sun Mar 28, 2010 2:43 pm
Posts: 76
Website: http://tomakefast.com
Location: Texas
I'm glad you solved your problem, even if we don't know exactly what caused it!

ilokano wrote:
My current setup:

pm = dynamic
pm.max_children = 10
pm.start_servers = 3
pm.min_spare_servers = 1
pm.max_spare_servers = 5

...this is for my website I linked above.

I would like to squeeze a few more WP sites I own into this server (Linode 768). Maybe 3-4 sites on this server with low traffic of only around 1,000-2,000 visitors per month. Would my server be able to handle the load?


Of course depends on what you're doing but most likely you're fine with that many visitors on a Linode.

I don't know how fpm works (I use spawn) but you may not need that many children. You can end up with lots of children sitting around consuming resources. I served 10,000 visitors/day with 3 children and never had trouble. My thinking is, fewer children = faster children. Of course there are other factors to consider, I don't know the exact point where 4 children becomes better than 3 for you, but I'd consider the law of diminishing returns--if fpm doesn't figure that out automatically.

_________________
PHP Development @ Tomakefast


Top
   
 Post subject:
PostPosted: Tue Nov 22, 2011 7:44 pm 
Offline
Senior Member

Joined: Sun Mar 28, 2010 2:43 pm
Posts: 76
Website: http://tomakefast.com
Location: Texas
Code:
/** Wordpress Memory Limit */
define('WP_MEMORY_LIMIT', '128M');


I set it to 128M but I probably just need 64M.

Hope this helps.[/quote]

I wonder if there's any benefit to lowering this. 8M doesn't really work, but 16M seems to work fine. But when I run "top" I don't see memory savings by lowering this value.

_________________
PHP Development @ Tomakefast


Top
   
 Post subject:
PostPosted: Wed Nov 23, 2011 1:03 am 
Offline
Senior Newbie

Joined: Fri Nov 18, 2011 1:02 pm
Posts: 9
Website: http://www.saigonnezumi.com
Yahoo Messenger: amerasiankevin
AOL: amerasiankevin
Location: HCMC, Vietnam
ferodynamics wrote:
Code:
/** Wordpress Memory Limit */
define('WP_MEMORY_LIMIT', '128M');


I set it to 128M but I probably just need 64M.

Hope this helps.


I wonder if there's any benefit to lowering this. 8M doesn't really work, but 16M seems to work fine. But when I run "top" I don't see memory savings by lowering this value.[/quote]

10M was not enough for me, some WP guys are using 64M. I want to bring it down to 32M and just play it by ear until I find the right value.

_________________
One of the very few Americans who travelled the world and can communicate in 7 languages.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group