Passing arguments to os.execute()

2014-06-18 Thread tsunny
Hello, How to send the value of a variable to a shell program using os.execute()? I want to send the value of $uri to my shell program. Below is my code, location / { set_by_lua $result 'os.execute("/tmp/test.sh $uri")'; } If I access $1 in my program, the value is just 'uri' not the va

Download full mp4 file with proxy_cache or proxy_store !!

2014-06-18 Thread shahzaib shahzaib
we're using two servers (one proxy and one backend). Proxy server is using proxy_cache to cache mp4 files from backend server and working fine. When i stream a full video from cache, the header response gives me the cache-status: HIT but whenever i seek the mp4 file i.e http://url/test.mp4?st

Re: upstream on OpenBSD not executing requests

2014-06-18 Thread prkumar
I think you can not have two server directive in upstream, how nginx would know which one to forward request to? Will it do round robin? Not sure about that will have to check.. Can you try by removing one.. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,250904,251036#msg-251036 __

Re: how to set timer?

2014-06-18 Thread prkumar
What do yo by it does not work? You mean your handler does not get called? If I were you I will attach gdb put a breakpoint at ngx_event_timer.c::ngx_event_expire_timers and see that why at line number 149 ev->handler(ev); is not getting called.? For nginx debugging and figurng things out nothing w

http Keepalive implementation

2014-06-18 Thread prkumar
I was going through NGINX source code to implement keepalive for nginx zeromq plugin that I have developed. I have been inspired by ngx_http_upstream_keepalive_module. Was wondering why nginx uses a kind of two linkedlist based stack implementation to implement keepalive connection pool. Why not us

Re: Caching servers in Local ISPs !!

2014-06-18 Thread shahzaib shahzaib
@Jonathon, yes you're right i should not post off-topic here, offcourse i thought as nginx has tremendous amount of capabilities and there might be alternative possibility of BGP too but i was wrong. I would be thankful if you help me on ngx-http_geo_module as it is related to nginx and help me wit

Re: Optimization of Nginx for 128 MB RAM VPS

2014-06-18 Thread Yumi
> But what with the worker_connections? I have read that this is the number of simultaneous connections a single process can handle. How high should this value be? I am expecting lets say 20 connections per hour. I will host there only my personal home page and my school notebook (based on Wordpres

Re: Nginx on Windows PHP fastcgi read timeouts

2014-06-18 Thread c0nw0nk
Yep it is a PHP application error. My Nginx log now outputs this. I doing more digging to see why it is acting up. 2014/06/18 23:20:49 [error] 3792#7764: *22709 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or e

Re: Sticky equivalent

2014-06-18 Thread Ruslan Ermilov
On Wed, Jun 18, 2014 at 08:46:04PM +0200, Stefanita Rares Dumitrescu wrote: > Oh god 1350$ Consistent hash is free of charge, it's in open source version. > On 18/06/2014 16:49, Ruslan Ermilov wrote: > > On Wed, Jun 18, 2014 at 11:22:24AM -0300, Fabiano Furtado Pessoa Coelho > > wrote: > >> Dear

Re: Caching servers in Local ISPs !!

2014-06-18 Thread Jonathan Matthews
On 18 Jun 2014 20:45, "shahzaib shahzaib" wrote: > > >>why not host those file on a professional CDN instead of in-house? > Because 80% of the traffic is from our country and 50% of that traffic is from the ISP we're talking to and this is the reason we deployed the caching box on this ISP edge.

Re: Nginx on Windows PHP fastcgi read timeouts

2014-06-18 Thread Maxim Dounin
Hello! On Wed, Jun 18, 2014 at 09:21:55AM -0400, c0nw0nk wrote: > Even with PHP_FCGI_MAX_REQUESTS=1 i still get it what log setting would > you like nginx set to ? > > Because mysql has no outputs in the slow query log that take more than 2 > seconds and PHP has no error outputs or crashes i

Re: Caching servers in Local ISPs !!

2014-06-18 Thread shahzaib shahzaib
>>why not host those file on a professional CDN instead of in-house? Because 80% of the traffic is from our country and 50% of that traffic is from the ISP we're talking to and this is the reason we deployed the caching box on this ISP edge. On Thu, Jun 19, 2014 at 12:35 AM, Lukas Tribus wrote:

RE: Caching servers in Local ISPs !!

2014-06-18 Thread Lukas Tribus
Hi, > ok, but i have no idea why ISP is asking for BGP and matter of fact is, > i'll have to make BGP work somehow, so local caching server will fetch > the new subnets from ISP router automatically (and i don't know how). I strongly suggest you hire some consultant who can help you setting all

Re: Sticky equivalent

2014-06-18 Thread Stefanita Rares Dumitrescu
Oh god 1350$ On 18/06/2014 16:49, Ruslan Ermilov wrote: On Wed, Jun 18, 2014 at 11:22:24AM -0300, Fabiano Furtado Pessoa Coelho wrote: Dear Ruslan, Can you post an example of using this hash feature? Thanks in advance. upstream u { hash $binary_remote_addr consistent; s

Re: Caching servers in Local ISPs !!

2014-06-18 Thread shahzaib shahzaib
>>geo { default 0; 10.0.0.0/8 1; 39.23.2.0/24 1; 112.50.192.0/18 1; } Sorry i didn't write accurately here but it is 10.0.0.0/8 1; in nginx config, so the problem is not the wrong syntax for geo {}. On Wed, Jun 18, 2014 at 11:24 PM, itpp2012 wrote: > shahzaib1232 Wrote: > -

Re: Caching servers in Local ISPs !!

2014-06-18 Thread itpp2012
shahzaib1232 Wrote: --- > > Btw, our local ISP provided us with some testing ip prefixes to check > nginx > based caching. i.e > geo { > default 0; > 10.0.0.0/8 > 39.23.2.0/24 1; > 112.50.192.0/18 1; > } > Typo?? geo { default 0; 10.0.0.0/8 1

Re: Caching servers in Local ISPs !!

2014-06-18 Thread shahzaib shahzaib
ok, but i have no idea why ISP is asking for BGP and matter of fact is, i'll have to make BGP work somehow, so local caching server will fetch the new subnets from ISP router automatically (and i don't know how). Btw, our local ISP provided us with some testing ip prefixes to check nginx based cac

Re: Nginx on Windows PHP fastcgi read timeouts

2014-06-18 Thread itpp2012
c0nw0nk Wrote: --- > Upon the change it gets worse now i do not even get a error the > browser just time's out. I have no idea if it is a Joomla issue or if > it is actualy something with PHP on windows. I get the feeling it is a > bit of both. T

Re: Nginx on Windows PHP fastcgi read timeouts

2014-06-18 Thread c0nw0nk
Upon the change it gets worse now i do not even get a error the browser just time's out. I have no idea if it is a Joomla issue or if it is actualy something with PHP on windows. I get the feeling it is a bit of both. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,250964,251014#msg-2510

Re: Nginx on Windows PHP fastcgi read timeouts

2014-06-18 Thread c0nw0nk
Doing further testing i have discoverd something disturbing. I can execute a page upon the website, the page never loads. Then when i go to load other pages they all give of a error. Fatal error: Maximum execution time of 30 seconds exceeded in C:\server\websites\ps\public_www\libraries\loader.ph

Re: Nginx on Windows PHP fastcgi read timeouts

2014-06-18 Thread Kurt Cancemi
I meant change max_execution_time = 30 to max_execution_time = 120 --- Kurt Cancemi http://www.getwnmp.org On Wed, Jun 18, 2014 at 11:58 AM, Kurt Cancemi wrote: > To change the Maximum execution time, in your php.ini change > max_execution_time 30 to 120. The maximum execution time is how low a

Re: Nginx on Windows PHP fastcgi read timeouts

2014-06-18 Thread Kurt Cancemi
To change the Maximum execution time, in your php.ini change max_execution_time 30 to 120. The maximum execution time is how low a php script may run for in seconds. --- Kurt Cancemi http://www.getwnmp.org On Wed, Jun 18, 2014 at 11:19 AM, c0nw0nk wrote: > Looking at it PHP, MySQL and Nginx hav

Re: Nginx on Windows PHP fastcgi read timeouts

2014-06-18 Thread c0nw0nk
Looking at it PHP, MySQL and Nginx have no changes in CPU although PHP did spike in I/O usage. And i disabled caching in Joomla and sometimes i came across this. PHP Fatal error: Maximum execution time of 30 seconds exceeded in C:\server\websites\ps\public_www\libraries\loader.php on line 183 D

Re: Sticky equivalent

2014-06-18 Thread Ruslan Ermilov
On Wed, Jun 18, 2014 at 11:22:24AM -0300, Fabiano Furtado Pessoa Coelho wrote: > Dear Ruslan, > > Can you post an example of using this hash feature? > > Thanks in advance. upstream u { hash $binary_remote_addr consistent; server 10.0.0.1; server 10.0.0.2; ser

Re: Sticky equivalent

2014-06-18 Thread Fabiano Furtado Pessoa Coelho
Dear Ruslan, Can you post an example of using this hash feature? Thanks in advance. On Wed, Jun 18, 2014 at 7:59 AM, Ruslan Ermilov wrote: > On Wed, Jun 18, 2014 at 12:24:32PM +0200, Stefanita Rares Dumitrescu wrote: >> Hi guys, >> >> I am running nginx 1.4 right now on a bunch of front end ser

RE: Optimization of Nginx for 128 MB RAM VPS

2014-06-18 Thread Lukas Tribus
> Hello, > > I have a 128 MB RAM VPS with 1 vcore of 2,2 GHz x86_64 CPU. The CPU is much > faster than the Rapsberry one so that is not a problem but the RAM usage, I > think, is. > > Could You help me optimize my Nginx installation? Is this really needed? Nginx doesn't use much RAM usually. How

Re: Nginx on Windows PHP fastcgi read timeouts

2014-06-18 Thread itpp2012
c0nw0nk Wrote: --- > error_log logs/error.log crit; > > Is my current setting should i change it to debug ? No option is required to get error messages about backend issues. Remove that first server {} block with the return 200, for fcgi try

Re: Nginx on Windows PHP fastcgi read timeouts

2014-06-18 Thread c0nw0nk
Even with PHP_FCGI_MAX_REQUESTS=1 i still get it what log setting would you like nginx set to ? Because mysql has no outputs in the slow query log that take more than 2 seconds and PHP has no error outputs or crashes in my syslog. error_log logs/error.log crit; Is my current setting should

Re: Optimization of Nginx for 128 MB RAM VPS

2014-06-18 Thread Maxim Konovalov
On 6/18/14 4:21 PM, akurczyk wrote: > I am expecting lets say 20 connections per hour. [...] Personally I don't think that you need any optimizations for such load. -- Maxim Konovalov http://nginx.com ___ nginx mailing list nginx@nginx.org http://mai

Optimization of Nginx for 128 MB RAM VPS

2014-06-18 Thread akurczyk
Hello, I have a 128 MB RAM VPS with 1 vcore of 2,2 GHz x86_64 CPU. The CPU is much faster than the Rapsberry one so that is not a problem but the RAM usage, I think, is. Could You help me optimize my Nginx installation? Thats my configuration: nginx.conf: http://pastebin.com/M55APXzD The work

Re: Sticky equivalent

2014-06-18 Thread Ruslan Ermilov
On Wed, Jun 18, 2014 at 12:24:32PM +0200, Stefanita Rares Dumitrescu wrote: > Hi guys, > > I am running nginx 1.4 right now on a bunch of front end servers, i am > running freebsd, and have nginx with sticky patch compiled from ports. > > I can't upgrade to 1.6 or later, because the sticky port

Sticky equivalent

2014-06-18 Thread Stefanita Rares Dumitrescu
Hi guys, I am running nginx 1.4 right now on a bunch of front end servers, i am running freebsd, and have nginx with sticky patch compiled from ports. I can't upgrade to 1.6 or later, because the sticky port seems to be broken. Was there any similar feature introduced in nginx, or how can we

Re: lots of work in a location block...

2014-06-18 Thread Valentin V. Bartenev
On Wednesday 18 June 2014 19:35:02 Steve Holdoway wrote: > That's a red herring... cut/paste error. The rewrite is being processed, > the result isn't being passed to the proxy server. > [..] Without a full and exact copy of your configuration there's no way to help you. Every single bit of it h

Re: Nginx on Windows PHP fastcgi read timeouts

2014-06-18 Thread itpp2012
PHP_FCGI_MAX_REQUESTS=0, try the recommended value of 1. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,250964,250992#msg-250992 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: Nginx on Windows PHP fastcgi read timeouts

2014-06-18 Thread itpp2012
Lets see some logging. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,250964,250990#msg-250990 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: lots of work in a location block...

2014-06-18 Thread Steve Holdoway
That's a red herring... cut/paste error. The rewrite is being processed, the result isn't being passed to the proxy server. On Wed, 2014-06-18 at 11:14 +0400, Valentin V. Bartenev wrote: > On Wednesday 18 June 2014 12:15:29 Steve Holdoway wrote: > > Hi Folks, > > > > I'm trying to integrate a pyt

Re: Nginx - OS Version supported

2014-06-18 Thread Valentin V. Bartenev
On Wednesday 18 June 2014 12:23:43 Vishal Mestri wrote: > > Hi All, > > > I have gone through below link which gives details about OS and Platform > supported. > http://nginx.org/en/#tested_os_and_platforms [..] Not "supported", but "tested" which currently something is very abstract, and me

Re: Nginx - OS Version supported

2014-06-18 Thread Vishal Mestri
Thank you for prompt response. But I would like to know which Redhat OS Platforms supported by Nginx or tested by Nginx. Thanks & Regards, Vishal Mestri - Original Message - From: "Steve Holdoway" To: nginx@nginx.org Sent: Wednesday, June 18, 2014 12:39:58 PM Subject: Re: Ngi

Re: lots of work in a location block...

2014-06-18 Thread Valentin V. Bartenev
On Wednesday 18 June 2014 12:15:29 Steve Holdoway wrote: > Hi Folks, > > I'm trying to integrate a python backend into a pre-existing php > website, and am having problems doing this as I need to rewrite the url > at the same time... eg: this is what isn't working. > > location = /example {

Re: Nginx - OS Version supported

2014-06-18 Thread Steve Holdoway
I'm happily running 1.6 -> 1.7.1 on current 64 bit CentOS 6.5. In the past, I've run 1.3 and up on CentOS 6. hth, Steve On Wed, 2014-06-18 at 12:23 +0530, Vishal Mestri wrote: > Hi All, > > > I have gone through below link which gives details about OS and > Platform supported. > > http://ngi

Nginx - OS Version supported

2014-06-18 Thread Vishal Mestri
Hi All, I have gone through below link which gives details about OS and Platform supported. http://nginx.org/en/#tested_os_and_platforms I just want to know if Redhat 6.4 and Redhat 6.5 is supported by nginx? In link about it mentions, linux 2.2 -3 , which is I guess kernel version.