Re: Nginx Zero Size Buffer Alerts !!

2016-02-26 Thread shahzaib shahzaib
Hi, Alright then, thanks for clarification. Regards. Shahzaib On Fri, Feb 26, 2016 at 5:12 PM, Valentin V. Bartenev wrote: > On Friday 26 February 2016 16:05:28 shahzaib shahzaib wrote: > > Hi, > > > > We've many zero size buff alerts related to file_uploader.ph

Nginx Zero Size Buffer Alerts !!

2016-02-26 Thread shahzaib shahzaib
Hi, We've many zero size buff alerts related to file_uploader.php file in nginx logs : 2016/02/26 12:56:02 [alert] 71067#0: *12457068 zero size buf in output t:0 r:0 f:1 - 000803E29F08 0-0 while sending request to upstream, client: 182.178.58.

Re: Nginx Slow download over 1Gbps load !!

2016-01-31 Thread shahzaib shahzaib
g 0/19 ! interface GigabitEthernet 0/19 description LH28765_3 no ip address speed 1000 ! port-channel-protocol LACP port-channel 3 mode active no shutdown LH26876_SW2# -- Is it alright ? Regards. Shahzaib On Sun, Jan 31, 2016 at 11:18 PM, shahzaib

Re: Nginx Slow download over 1Gbps load !!

2016-01-31 Thread shahzaib shahzaib
Hi, Thanks a lot for response. Now i am doubting that issue is on network layer as i can examine lots of retransmitted packets in netstat -s output. Here is the server's status : http://prntscr.com/9xa6z2 Following is the thread with same mentioned issue : http://serverfault.com/questions/21810

Nginx Slow download over 1Gbps load !!

2016-01-30 Thread shahzaib shahzaib
Hi, We've recently shifted to FreeBSD-10 due to its robust asynchronous performance for big storage based on .mp4 files. Here is the server specs : 2 x Intel Xeon X5690 96GB DDR3 Memory 12 x 3TB SATA Raid-10 (HBA LSI-9211) ZFS FileSystem with 18TB usable space 2 x 1Gbps LACP (2Gbps Throughput) T

Re: Nginx + Php-fpm Ownership issue !!

2015-12-30 Thread shahzaib shahzaib
Thanks for reply. However, our developer just notified us that the directory with root owner was created by a cron which ran by user root and created that issue though I've slightly modified nginx user directive with following : former user www ; later user www www; Regards. Shahzaib On Wed, De

Nginx + Php-fpm Ownership issue !!

2015-12-29 Thread shahzaib shahzaib
Hi, We've installed nginx + php-fpm on FreeBSD OS and both of them are listening on www user / group. Here is the config : NGINX : user www ; PHP-FPM : [www] listen = /var/run/www.socket user = www group = www listen.owner = www listen.group = www listen.allowed_clients = 127.0.0.1 -

Slow mp4 buffer over SSL !!

2015-12-27 Thread shahzaib shahzaib
Hi, We've shifted our static content to SSL recently and found that mp4 streaming is drastically slow over SSL ( around 90KBps on 4Mbps connection) and if we test the same video over HTTP it gives us full 400+KBps speed. Here is the SSL config : server { listen 443 spdy; ssl on;

SSL handshake issue !!

2015-12-03 Thread shahzaib shahzaib
Hi, We've been encountering this issue quiet frequently. Looks like that is the reason of our drop in traffic as well. 2015/12/03 16:19:18 [crit] 26272#0: *176263213 SSL_do_handshake() failed (SSL: error:140A1175:SSL routines:SSL_BYTES_TO_CIPHER_LIST:inappropriate fallback) while SSL handshaki

Re: 400 Error on % !!

2015-11-23 Thread shahzaib shahzaib
, Nov 23, 2015 at 1:20 PM, nanaya wrote: > > > On Mon, Nov 23, 2015, at 05:17 PM, shahzaib shahzaib wrote: > > Hi, > > > >We've encountered with 400 Bad request error on nginx reverse proxy in > > front of apache. Here is the attached link : > > > >

400 Error on % !!

2015-11-23 Thread shahzaib shahzaib
Hi, We've encountered with 400 Bad request error on nginx reverse proxy in front of apache. Here is the attached link : http://prntscr.com/95wlsl If we remove '%' from the URL, it works fine. What could be the issue ? Regards. Shahzaib Need to send me private email? I use Virtru

Re: Redirect request based on source $scheme !!

2015-11-11 Thread shahzaib shahzaib
bedding the content will need to be clever > enough to follow redirects on included resources, which is I think the case > of any standard use-case. > > ​Am I missing something there?​ > --- > *B. R.* > > On Wed, Nov 11, 2015 at 2:32 PM, Francis Daly wrote: > >> On We

Re: Redirect request based on source $scheme !!

2015-11-11 Thread shahzaib shahzaib
equests such as : Is request coming from http://ad.domain.com or is it coming from https://ad.domain.com ? On Wed, Nov 11, 2015 at 4:02 PM, Avraham Serour wrote: > if you don't own the domain then you won't ever receive the request and > you can't do nothing about it > &

Re: Redirect request based on source $scheme !!

2015-11-11 Thread shahzaib shahzaib
One point is worth mentioning, we don't own ad.domain.com its a 3rd party website. All we can control is ourdomain.com. On Wed, Nov 11, 2015 at 3:25 PM, shahzaib shahzaib wrote: > >>you can create separate server blocks for each domain > I think issue will still p

Re: Redirect request based on source $scheme !!

2015-11-11 Thread shahzaib shahzaib
ce that if the request for HTTP embedded link comes from any HTTPS domain , nginx will detect that source $scheme and redirect that request to HTTPS. On Wed, Nov 11, 2015 at 3:10 PM, Avraham Serour wrote: > you can create separate server blocks for each domain > > On Wed, Nov 11,

Redirect request based on source $scheme !!

2015-11-11 Thread shahzaib shahzaib
Hi, Is there a way we can serve $scheme (HTTP/HTTPS) based on source request ? Such as : if https://ad.domain.com --> sends request to http://ourdomain.com (as it'll fail due to cross $scheme conflict) So http://ourdomain.com will check that the request invoked using https $scheme and it'll

Re: DocumentRoot should end up on specific file !

2015-08-31 Thread shahzaib shahzaib
Hi, THanks, looking into it. Regards. Shahzaib On Mon, Aug 31, 2015 at 7:33 PM, Dewangga Bachrul Alam < dewangg...@xtremenitro.org> wrote: > Hello! > > On 08/31/2015 09:29 PM, shahzaib shahzaib wrote: > > Hi, > > > > We want nginx vhost to access

DocumentRoot should end up on specific file !

2015-08-31 Thread shahzaib shahzaib
Hi, We want nginx vhost to access the file audo_portal.php without specifying it,i.e instead of using URL http://domain.com/audio_portal.php , can we access it with http://domain.com ? So it'll directly access audio_portal.php just like index.php ? Regards. Shahzaib ___

Re: Redirect on specific threshold !!

2015-08-29 Thread shahzaib shahzaib
Mon, Jun 15, 2015 at 01:45:42PM +0300, Valentin V. Bartenev wrote: > > On Sunday 14 June 2015 22:12:37 shahzaib shahzaib wrote: > > Hi there, > > > > If there are exceeding 1K requests for > http://storage.domain.com/test.mp4 , > > > nginx should construct

Re: Free O’Reilly animal book about nginx

2015-07-30 Thread shahzaib shahzaib
Whoops, http://prntscr.com/7yzccl That's great btw :) On Fri, Jul 31, 2015 at 1:40 AM, Sarah Novotny wrote: > > On Jul 30, 2015, at 1:12 PM, Igal @ Lucee.org wrote: > > this is awesome news! congrats!!! > > the download link is broken though (404). > > > It’s been fixed :) > > sarah > > > __

Re: Nginx support fot Weedfs !!

2015-07-02 Thread shahzaib shahzaib
Guys any advice ? On Thu, Jun 25, 2015 at 4:17 AM, shahzaib shahzaib wrote: > Hi, > >We're deploying WeedFS distributed filesystem for thumbs storage and > scalabilty. Weedfs is composed of two layers (Master, Volume). Master > server does all metadata mapping to tra

Re: Can thread pool improve performance for such scenario

2015-06-30 Thread shahzaib shahzaib
Hi, This is what they have to say about threads : Offloading read operations to the thread pool is a technique applicable to very specific tasks. It is most useful where the volume of frequently requested content doesn’t fit into the operating system’s VM cache. This might be the case with, for

Nginx-1.9.2 fatal code 2 !!

2015-06-29 Thread shahzaib shahzaib
Hi, We've just compiled latest nginx-1.9.2 on Debian wheezy 7 in order to utilize aio threads directive for our storage but nginx started to crash since we enabled aio threads on it. Following is the compiled options and log about the crash : root@archive3:/usr/local/nginx/conf/vhosts# nginx -V

Nginx support fot Weedfs !!

2015-06-24 Thread shahzaib shahzaib
Hi, We're deploying WeedFS distributed filesystem for thumbs storage and scalabilty. Weedfs is composed of two layers (Master, Volume). Master server does all metadata mapping to track the corresponding volume server against user requested file whereas volume server is the actual storage to ser

Re: Redirect on specific threshold !!

2015-06-15 Thread shahzaib shahzaib
ginx reverse proxy with cache fit you need? > > Client -> Caching server (with SSD and nginx proxy cache configured) -> > Storage server(s) (Slow) > > You can add even more storage server by utilizing nginx upstream module. > > On Sun, Jun 14, 2015 at 1:12 PM shahzaib shahzai

Redirect on specific threshold !!

2015-06-14 Thread shahzaib shahzaib
Hi, We're using Nginx to serve videos on one of our Storage server(contains mp4 videos) and due to high amount of requests we're planning to have a separate caching Node based on Fast SSD drives to serve "Hot" content in order to reduce load from Storage. We're planning to have following method

Re: Static files bad loading time

2015-05-08 Thread shahzaib shahzaib
. Bartenev wrote: > On Friday 08 May 2015 18:05:51 shahzaib shahzaib wrote: > > Well, reducing keepalive_timeout and increasing the values of > > worker_connections resolved our issue. Following is the reference we used > > to tweak nginx config : > > > > > htt

Re: Nginx gets halt on 15K connections !!

2015-05-08 Thread shahzaib shahzaib
working well to entertain large number of connections with 900Mbps outward traffic. Here's our workers and connections settings: worker_processors 48; worker_connections 102400; Regards. Shahzaib On Fri, May 8, 2015 at 6:05 PM, Valentin V. Bartenev wrote: > On Thursday 07 May 2015 18:38:23

Re: Static files bad loading time

2015-05-08 Thread shahzaib shahzaib
, Valentin V. Bartenev wrote: > On Thursday 07 May 2015 23:27:44 shahzaib shahzaib wrote: > > Hi, > > > >There are some tweaks required to nginx configurations. If the same > > image which usually takes second to response can takes upto 10-20 seconds > > to load,

Re: Static files bad loading time

2015-05-07 Thread shahzaib shahzaib
Hi, There are some tweaks required to nginx configurations. If the same image which usually takes second to response can takes upto 10-20 seconds to load, the wide guess would be exceeding concurrent connections at peak traffic. The directive worker_rlimit_nofile value is set much lower as comp

Re: Nginx gets halt on 15K connections !!

2015-05-07 Thread shahzaib shahzaib
? Regards. Shahzaib On Sun, May 3, 2015 at 3:11 AM, shahzaib shahzaib wrote: > Experts, > > Could you please do me a favor in order to solve this problem ? > > Regards. > Shahzaib > > On Sat, May 2, 2015 at 3:32 PM, shahzaib shahzaib > wrote: > >> Hi, >

Re: Nginx gets halt on 15K connections !!

2015-05-02 Thread shahzaib shahzaib
Experts, Could you please do me a favor in order to solve this problem ? Regards. Shahzaib On Sat, May 2, 2015 at 3:32 PM, shahzaib shahzaib wrote: > Hi, > > We've been running nginx-1.8 instance on one of our media server to > serve big static .mp4 files as we

Nginx gets halt on 15K connections !!

2015-05-02 Thread shahzaib shahzaib
Hi, We've been running nginx-1.8 instance on one of our media server to serve big static .mp4 files as well as small files such as .jpeg. Nginx is serving well under 13K connections/sec with 800Mbps outgoing network load but whenever requests exceed 15K connections, nginx gets halt and 'D' sta

Re: open socket #84 left in connection

2015-04-21 Thread shahzaib shahzaib
Hi, Problem was with monit which was kept on restarting nginx persistently. Thanks !! On Mon, Apr 20, 2015 at 7:23 PM, shahzaib shahzaib wrote: > I have also enabled debug logging and found 'Resource temporarily > unavailable' messages. Below is the reference sample : &

Re: open socket #84 left in connection

2015-04-20 Thread shahzaib shahzaib
deos/2015/04/15/14290705507373d-360.mp4?" Could that be the issue ? On Mon, Apr 20, 2015 at 6:18 PM, shahzaib shahzaib wrote: > Hi, > > We're using nginx to upload and serve videos files around 1GB of file > size via http. We've been receiving complains from some cus

open socket #84 left in connection

2015-04-20 Thread shahzaib shahzaib
Hi, We're using nginx to upload and serve videos files around 1GB of file size via http. We've been receiving complains from some customers that uploading has some issue and sometimes user are unable to upload videos successfully. Server is installed with Nginx-1.4.7+php-fpm, ffmpeg, MP4Box. On

Re: Internal Server Error !!

2015-03-27 Thread shahzaib shahzaib
Hi, Just want to inform that we're still facing this issue with mp4. Regards. Shahzaib On Mon, Mar 23, 2015 at 7:10 PM, shahzaib shahzaib wrote: > Hi, > >Nginx logging mp4 related error intermittently. Following is the log : > > 2015/03/23 19:01:53 [crit] 8

Internal Server Error !!

2015-03-23 Thread shahzaib shahzaib
Hi, Nginx logging mp4 related error intermittently. Following is the log : 2015/03/23 19:01:53 [crit] 8671#0: *782950 pread() "/tunefiles/storage17/files/videos/2014/05/07/13994800482e2b0-360.mp4" failed (22: Invalid argument), client: 182.178.204.162, server: storage17.domain.com, request: "

Re: Fake video sharing Android App !!

2015-03-17 Thread shahzaib shahzaib
@itpp, you're right but even if we can partially solve this problem, it'll be sufficient for us. Well, using below method worked in our case : location ~ \.(mp4)$ { mp4; root /var/www/html/conversion; expires 1d; valid_referers server

Re: Fake video sharing Android App !!

2015-03-17 Thread shahzaib shahzaib
@itpp, as i sent the logs above that referer_header for android requests are empty, maybe blocking requests based on empty referer_header will partially resolve our issue ? Following is the config i used to block empty referer_header but in vain. valid_referers server_names ~.; if ($invalid_refere

Re: Fake video sharing Android App !!

2015-03-17 Thread shahzaib shahzaib
'"$http_user_agent" "$http_x_forwarded_for"'; Thanks. Shahzaib On Mon, Mar 16, 2015 at 7:50 PM, Francis Daly wrote: > On Mon, Mar 16, 2015 at 06:45:30PM +0500, shahzaib shahzaib wrote: > > Hi there, > > > I have installed that and

Re: Fake video sharing Android App !!

2015-03-16 Thread shahzaib shahzaib
On Mon, Mar 16, 2015 at 6:28 PM, Francis Daly wrote: > On Mon, Mar 16, 2015 at 04:09:30PM +0500, shahzaib shahzaib wrote: > > Hi there, > > > Webserver is nginx and hotlinking is already enabled but the issue with > no > > Referer_Header for the requests being generated

Fake video sharing Android App !!

2015-03-16 Thread shahzaib shahzaib
Guys, someone cloned our videosharing website and created a FAKE android application using same name as our website and people considering it as our app, which is not. The main problem we're facing is, the videos being served from this android application are hotlinked to our server due to which we

Limit incoming bandwith with nginx !!

2015-01-30 Thread shahzaib shahzaib
Hi, is there a way we can limit incoming bandwidth (from Remote to linux box) using nginx ? Nginx is forwarding user requests to different URL and downloading videos locally due to which server's incoming port is choking on 1Gbps for large number of concurrent users. If we can lower incoming ba

Re: Geoip issue with nginx in front of varnish and apache !

2015-01-20 Thread shahzaib shahzaib
:38:21PM +0500, shahzaib shahzaib wrote: > > Hi there, > > > We've compile varnish with geoip module in order to cache country > based > > hashes, so far varnish<-> apache structure is working fine with geoip > > module and caching requests based on count

Geoip issue with nginx in front of varnish and apache !

2015-01-20 Thread shahzaib shahzaib
Hi, We've compile varnish with geoip module in order to cache country based hashes, so far varnish<-> apache structure is working fine with geoip module and caching requests based on countries but when we add another Nginx proxy layer in front of varnish i.e nginx -> varnish - apache, the geoi

Re: Forward single request to upstream server via proxy_store !!

2014-09-29 Thread shahzaib shahzaib
Also, removing arguments after "?" also disabled the pseudo streaming. So i think i can't apply this method !! On Mon, Sep 29, 2014 at 6:05 PM, shahzaib shahzaib wrote: > @RR, i would like to inform you that the issue regarding failed stream for > 1st request is solved.

Re: Forward single request to upstream server via proxy_store !!

2014-09-29 Thread shahzaib shahzaib
-transfer-encoding-chunked-encoding-in-varnish thanks !! On Sat, Sep 27, 2014 at 10:41 AM, shahzaib shahzaib wrote: > >>In general it shouldn’t since the ‘?start=’ is handled by nginx and not > varnish, but I’m not exactly sure how the mp4 module of nginx handles a > proxied request

Re: Forward single request to upstream server via proxy_store !!

2014-09-26 Thread shahzaib shahzaib
>>In general it shouldn’t since the ‘?start=’ is handled by nginx and not varnish, but I’m not exactly sure how the mp4 module of nginx handles a proxied request. You have to test it. Sure, i'll test it. sub vcl_fetch { return (pass); } You're right about return(pass), coalescing doesn't work wi

Re: Forward single request to upstream server via proxy_store !!

2014-09-25 Thread shahzaib shahzaib
@RR, thanks a lot for the explanation and examples. It really helped me :) >>set req.url = regsub(req.url, "\?.*", ""); It will also prevent users seeking the video because the arguments after "?" will remove whenever user will try to seek the video stream, isn't it ? >>unset req.http.Cookie; un

Re: Forward single request to upstream server via proxy_store !!

2014-09-25 Thread shahzaib shahzaib
proxy_storeon; proxy_store_access user:rw group:rw all:r; root /var/www/html/tunefiles; } } I can also send the configs which were configured for nginx in front of varnish (which didn't resolved my issue). BTW, i am using malloc storage instead of file in varnis

Re: Forward single request to upstream server via proxy_store !!

2014-09-24 Thread shahzaib shahzaib
@RR, That's great. Sure it will help me. I am starting to work with it on local environment and will get back to you once the progress started :) Thanks a lot for writing sample config for me !! On Wed, Sep 24, 2014 at 6:32 PM, Reinis Rozitis wrote: > @RR. could you guide me a bit on it or poin

Re: Forward single request to upstream server via proxy_store !!

2014-09-24 Thread shahzaib shahzaib
@RR. could you guide me a bit on it or point me to some guide to start with. I have worked with varnish regarding php caching so i have the basic knowledge of varnish but i am just not getting on how to make it work with proxy_store. :( On Wed, Sep 24, 2014 at 2:42 AM, Reinis Rozitis wrote: > Bu

Re: Forward single request to upstream server via proxy_store !!

2014-09-23 Thread shahzaib shahzaib
SO tmp.txt plays the main role here and prevent the subsequent requests for the same file but i have no idea how to implement it with nginx. Only if someone point me towards right direction. :( Regards. Shahzaib On Tue, Sep 23, 2014 at 9:41 PM, Valentin V. Bartenev wrote: > On Tuesday 23 Sept

Re: Forward single request to upstream server via proxy_store !!

2014-09-23 Thread shahzaib shahzaib
@Valentine, is proxy_cache_lock supported with proxy_store ? On Tue, Sep 23, 2014 at 7:03 PM, Valentin V. Bartenev wrote: > On Tuesday 23 September 2014 00:06:56 shahzaib shahzaib wrote: > > Is there any way with nginx that i could put an hold on the subsequent > > requests and

Re: Forward single request to upstream server via proxy_store !!

2014-09-22 Thread shahzaib shahzaib
, Sep 21, 2014 at 2:05 PM, shahzaib shahzaib wrote: > Hi, > > When the multiple users request for same file on edge server via > proxy_store and requested file is still not downloaded on the edge server, > the nginx keeps on proxying those requests towards the origin server due to

Forward single request to upstream server via proxy_store !!

2014-09-21 Thread shahzaib shahzaib
Hi, When the multiple users request for same file on edge server via proxy_store and requested file is still not downloaded on the edge server, the nginx keeps on proxying those requests towards the origin server due to which network port is getting saturated on the edge server and file downloadi

Re: zero size buf in output !!

2014-09-19 Thread shahzaib shahzaib
Nope, it doesn't !! On Fri, Sep 19, 2014 at 3:42 PM, Roman Arutyunyan wrote: > Will this error appear if you try this request again? > > On 17 Sep 2014, at 16:29, shahzaib shahzaib wrote: > > > Well, i again received the same error but its much improvement in time &g

Re: Proxy_store downloading half videos !!

2014-09-18 Thread shahzaib shahzaib
the assumption) > > Eliezer > > On 09/18/2014 08:58 PM, shahzaib shahzaib wrote: > >> This issue is fixed, now i am getting another issue. Whenever user >> requests for new file which is not yet downloaded on the edge server, >> user gets the 403 forbidden error on b

Re: Proxy_store downloading half videos !!

2014-09-18 Thread shahzaib shahzaib
403 error on first time ? On Thu, Sep 18, 2014 at 6:45 PM, shahzaib shahzaib wrote: > Looks like on using the proxy_pass http://fl008.origin.com:80 > <http://fl008.origin.com>$uri; it worked . Could :80 be the issue ? > > On Thu, Sep 18, 2014 at 6:43 PM, shahzaib

Re: Proxy_store downloading half videos !!

2014-09-18 Thread shahzaib shahzaib
Looks like on using the proxy_pass http://fl008.origin.com:80 <http://fl008.origin.com>$uri; it worked . Could :80 be the issue ? On Thu, Sep 18, 2014 at 6:43 PM, shahzaib shahzaib wrote: > >>proxy_pass http://fl008.origin.com$uri; > It didn't work instead the error 502

Re: Proxy_store downloading half videos !!

2014-09-18 Thread shahzaib shahzaib
>>proxy_pass http://fl008.origin.com$uri; It didn't work instead the error 502 gateway started to show up when proxying the request via proxy_pass. On Thu, Sep 18, 2014 at 6:32 PM, shahzaib shahzaib wrote: > Thanks a lot for the solution Roman, i'll get back to you after

Re: Proxy_store downloading half videos !!

2014-09-18 Thread shahzaib shahzaib
> > > On 18 Sep 2014, at 15:25, shahzaib shahzaib wrote: > > > Yes, the mp4 modules is enabled on origin as well as edge. Could you > please help me resolving the issue ? > > > > On Thu, Sep 18, 2014 at 4:21 PM, Roman Arutyunyan > wrote: > > > >

Re: Proxy_store downloading half videos !!

2014-09-18 Thread shahzaib shahzaib
Yes, the mp4 modules is enabled on origin as well as edge. Could you please help me resolving the issue ? On Thu, Sep 18, 2014 at 4:21 PM, Roman Arutyunyan wrote: > > On 18 Sep 2014, at 14:49, shahzaib shahzaib wrote: > > > Hi, > > > >We're using pr

Re: Proxy_store downloading half videos !!

2014-09-18 Thread shahzaib shahzaib
--lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --user=nginx --group=nginx --with-http_flv_module --with-http_mp4_module On Thu, Sep 18, 2014 at 3:49 PM, shahzaib shahzaib wrote: > Hi, > >We

Proxy_store downloading half videos !!

2014-09-18 Thread shahzaib shahzaib
Hi, We're using proxy_store on the edge server for replicating requested mp4 files and some of our users reported that some of the videos are half sized and therefore they are unable to stream whole video file on their end (coming from the edge server). On digging into the access_logs of nginx,

Re: zero size buf in output !!

2014-09-17 Thread shahzaib shahzaib
ock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --user=nginx --group=nginx --with-http_flv_module --with-http_mp4_module You have mail in /var/spool/mail/root Regards. Shahzaib On Wed, Sep 17, 2014 at 4:25 PM, shahzaib shahzaib wr

Re: zero size buf in output !!

2014-09-17 Thread shahzaib shahzaib
Hi Maxim, Upgraded nginx to 1.7.4 and looks like the issue is gone. Regards. Shahzaib On Wed, Aug 27, 2014 at 10:16 PM, Maxim Dounin wrote: > Hello! > > On Wed, Aug 27, 2014 at 08:48:19PM +0500, shahzaib shahzaib wrote: > > > We're facing following error on edge

zero size buf in output !!

2014-08-27 Thread shahzaib shahzaib
We're facing following error on edge server with nginx-1.6.1, using proxy_store on edge. 2014/08/27 20:35:05 [alert] 5701#0: *21244 zero size buf in output t:0 r:0 f:0 02579840 02579840-0257A840 0-0 while sending to client, client: 119.160.118.123, server

Combining proxy_store and proxy_cache values !!

2014-08-27 Thread shahzaib shahzaib
Hi, I am using proxy_store on edge server to replicate mp4 files from origin server when user request for the video file. The reason i am not using proxy_cache is, when user seeks through the mp4 video,proxy_cache keeps on downloading whole video file with different Keys if multiple users access

Re: Download full mp4 file with proxy_cache or proxy_store !!

2014-07-25 Thread shahzaib shahzaib
proxy_store resolve the issue ? I really need to find the solution. Btw, nginx version is 1.6 Regards. On Mon, Jun 23, 2014 at 11:06 PM, shahzaib shahzaib wrote: > >> You can use proxy_store with the mp4 module. > So, proxy_store is able to download whole mp4 file once and

Re: Proxy_pass Directive !!

2014-07-20 Thread shahzaib shahzaib
>>1.2.3.4 -> request xx.mp4 -> edge 5.6.7.8 (I don't have that file) -> send client address of origin and tell client to re-initiate file request with origin address. @itpp, you're always the light of hope in darkness :-).Thats the exact solution i need, rewrite is not recommended in our solution

Re: Proxy_pass Directive !!

2014-07-19 Thread shahzaib shahzaib
>>If nginx needs to proxy_pass, then before nginx sends content to client, nginx asks upstream for content, and upstream sends content to nginx. So the full file also goes from upstream to nginx. Means, both server's i/o will be used if the requested file to upstream is 720p.mp4? _

Proxy_pass Directive !!

2014-07-19 Thread shahzaib shahzaib
I am confused about the proxy_pass directive. Suppose, i need to serve an mp4 file from Origin server and using proxy_pass directive in Edge server, whose resources(I/o,bandwidth,Ram) will be used ? Edge or Origin ? Following is the topology to server mp4 file :- client (request mp4 file) --> edge

Re: proxy_cache not serving file from edge server !!

2014-07-01 Thread shahzaib shahzaib
Our caching method is :- client > origin ---> edge. On Tue, Jul 1, 2014 at 4:57 PM, shahzaib shahzaib wrote: > We've an origin and edge server with nginx-1.6 . Origin web-server(Located > in U.S) is configured with nginx_geo_module and edge(Local ISP) is > configured

proxy_cache not serving file from edge server !!

2014-07-01 Thread shahzaib shahzaib
We've an origin and edge server with nginx-1.6 . Origin web-server(Located in U.S) is configured with nginx_geo_module and edge(Local ISP) is configured with proxy_cache in order to cache files from origin server and serve from their lately. We're using following method for caching with proxy_cache

Re: Download full mp4 file with proxy_cache or proxy_store !!

2014-06-23 Thread shahzaib shahzaib
>> You can use proxy_store with the mp4 module. So, proxy_store is able to download whole mp4 file once and than server that file locally without fetching each time from the origin if users seek through the video ? On Mon, Jun 23, 2014 at 7:43 PM, Roman Arutyunyan wrote: > > On 23 Jun 2014, at

Re: Download full mp4 file with proxy_cache or proxy_store !!

2014-06-23 Thread shahzaib shahzaib
>>Hmm, what about a hack, if the file is cached keep a link to the cached file and its original name, if the next request matches a cached file and its original name and a seek is requested then pass the cache via its original name to allow seeking on the local (but cached) file. That means, i sho

Re: Download full mp4 file with proxy_cache or proxy_store !!

2014-06-23 Thread shahzaib shahzaib
; > On 19 Jun 2014, at 10:12, shahzaib shahzaib wrote: > > > > > 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 res

Re: Download full mp4 file with proxy_cache or proxy_store !!

2014-06-20 Thread shahzaib shahzaib
@Lukas, we're using nginx-1.6 and byte range caching is already enabled by default(i guess). Below is the curl request :- curl -H Range:bytes=16- -I http://videos.files.com/files/videos/2014/06/20/14032606291de19-360.mp4 HTTP/1.1 206 Partial Content Server: nginx Date: Fri, 20 Jun 2014 13:36:05 G

Re: using 2000+ ip prefixes in nginx geo module !!

2014-06-19 Thread shahzaib shahzaib
gateway error. On Fri, Jun 20, 2014 at 9:57 AM, shahzaib shahzaib wrote: > Issue will only resolve once i remove 110.93.192.0/18 US; from geo.conf. > > > On Fri, Jun 20, 2014 at 9:55 AM, shahzaib shahzaib > wrote: > >> I removed /24 on per your suggestion and also

Re: using 2000+ ip prefixes in nginx geo module !!

2014-06-19 Thread shahzaib shahzaib
Issue will only resolve once i remove 110.93.192.0/18 US; from geo.conf. On Fri, Jun 20, 2014 at 9:55 AM, shahzaib shahzaib wrote: > I removed /24 on per your suggestion and also used different code for > override but the issue persists. Modified geo.conf :- > > 39.4

Re: using 2000+ ip prefixes in nginx geo module !!

2014-06-19 Thread shahzaib shahzaib
at overlap. I > think you can probably override with a different country code but using the > same makes no sense. > > Steve. > > > On 19/06/14 21:06, shahzaib shahzaib wrote: > >For testing purpose, i have added only few prefixes :- > > geo { > defau

Re: using 2000+ ip prefixes in nginx geo module !!

2014-06-19 Thread shahzaib shahzaib
this error, i have to manually remove a network from the file which is 110.93.192.0/18 TW; What so suspicious with this prefix 110.93.192.0/18 TW ? Why it is causing to crash every other requests ? On Fri, Jun 20, 2014 at 12:07 AM, Jonathan Matthews wrote: > On 19 June 2014 19:59, shahz

using 2000+ ip prefixes in nginx geo module !!

2014-06-19 Thread shahzaib shahzaib
We've added 2000+ ip prefixes in a file "geo.conf" included in nginx vhost by using ngx-http_geo_module and received the following warning :- 2014/06/19 23:52:46 [warn] 1633#0: duplicate network "103.24.96.0/22", value: "tw", old value: "tw" in /usr/local/nginx/conf/geo.conf:40 2014/06/19 23:52:46

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: Caching servers in Local ISPs !!

2014-06-18 Thread shahzaib shahzaib
05 AM, Jonathan Matthews wrote: > 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: 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 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 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: Best method for adding GeoIP support

2014-06-17 Thread shahzaib shahzaib
Maybe ngx_geo_module could help you, it's comes built-in with nginx and doesn't need re-compilation. http://nginx.org/en/docs/http/ngx_http_geo_module.html On Wed, Jun 18, 2014 at 11:51 AM, Kurt Cancemi wrote: > Hello, > > There is no way to do this with the packages from nginx.org, without >

Re: Caching servers in Local ISPs !!

2014-06-17 Thread shahzaib shahzaib
he ISP has added more clients to their network ? I'll also have to add those new ip prefixes to DNS server. On Tue, Jun 17, 2014 at 11:45 PM, shahzaib shahzaib wrote: > >>Why not use a DNS for the clients? > How i would be sure that request coming from the ISP-1 on the DNS server

Re: Caching servers in Local ISPs !!

2014-06-17 Thread shahzaib shahzaib
>>Why not use a DNS for the clients? How i would be sure that request coming from the ISP-1 on the DNS server and then point it to the local caching server? I mean i can use View directive of BIND to route specific ips (local ISP clients) to the local caching server and what if tomorrow the ISP has

Re: Caching servers in Local ISPs !!

2014-06-17 Thread shahzaib shahzaib
i don't think the solution rdns will be suitable for us. I have checked the zebra software to make linux a BGP router http://www.techrepublic.com/article/use-zebra-to-set-up-a-linux-bgp-ospf-router/ Could you tell me if BGP is capable of doing what we want? Because our local ISP supports this meth

Re: Caching servers in Local ISPs !!

2014-06-17 Thread shahzaib shahzaib
Thanks itpp but the issue is still same and still the ip is from the main server in inspect element as well as in local-caching nginx access logs, i am getting the client ip as main-server's ip instead of original client ip and i am sure that i am doing something wrong. Well i have another question

Re: Caching servers in Local ISPs !!

2014-06-16 Thread shahzaib shahzaib
_cache_min_uses 1; } Maybe i need to add some variable to get original server ip ? <http://nginx.org/en/docs/http/ngx_http_geo_module.html> <http://nginx.org/en/docs/http/ngx_http_geo_module.html> On Fri, Jun 6, 2014 at 8:56 PM, shahzaib shahzaib wrote: > Thanks a

Really high disk i/o !!

2014-06-16 Thread shahzaib shahzaib
Our server HDD i/o is constant on 8MB/s and i/o utilization + await is very high due to which nginx video streaming is really slow and we're receiving complains from our users regarding slow streaming of the videos. We're using 12X3TB SATA HDD Hardware-Raid10 with 16G RAM OS Centos 6.4 8MB/s w/r

Re: http_geo_module invalid option during compile !!

2014-06-09 Thread shahzaib shahzaib
2AM +0500, shahzaib shahzaib wrote: > > Does nginx Geo module work on nginx ? I am getting the following error > > during compiling nginx-1.4.7 with it : > > > > ./configure --with-http_mp4_module --with-http_flv_module > > --with-http_geoip_module --with-http_geo_mod

http_geo_module invalid option during compile !!

2014-06-08 Thread shahzaib shahzaib
Does nginx Geo module work on nginx ? I am getting the following error during compiling nginx-1.4.7 with it : ./configure --with-http_mp4_module --with-http_flv_module --with-http_geoip_module --with-http_geo_module --sbin-path=/usr/local/sbin --with-debug ./configure: error: invalid option "--w

Re: Caching servers in Local ISPs !!

2014-06-06 Thread shahzaib shahzaib
Thanks a lot itpp. :) I'll look into it and get back to you. Thanks again for quick solution :) On Fri, Jun 6, 2014 at 8:26 PM, itpp2012 wrote: > shahzaib1232 Wrote: > --- > > @itpp I am currenlty proceeding with proxy_cache method just becau

  1   2   >