Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRYHk-0006ut-6U for pgadmin-hackers@arkaria.postgresql.org; Thu, 12 Jan 2017 05:50:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cRYHj-0002Qu-Pj for pgadmin-hackers@arkaria.postgresql.org; Thu, 12 Jan 2017 05:50:51 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cRYHV-0001dk-Cl for pgadmin-hackers@postgresql.org; Thu, 12 Jan 2017 05:50:37 +0000 Received: from mail-qk0-x22f.google.com ([2607:f8b0:400d:c09::22f]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cRYHS-0003VM-Lg for pgadmin-hackers@postgresql.org; Thu, 12 Jan 2017 05:50:36 +0000 Received: by mail-qk0-x22f.google.com with SMTP id u25so10125974qki.2 for ; Wed, 11 Jan 2017 21:50:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hagander-net.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=kgNvjIWLJfU+SnbiEB+HNDdY21gzftp5UlZ1PdJ968Q=; b=bskfpe4tRQ5omkWo87ZSAMDMmS0ySmSN4YOl3iOUFRK2SAcz68Zxpzs1Xvn+Df2Pxm OnGUbgG73UO1qHnEZkYVIQSwBcH7ajFXzhS8XHpIGRrBSQjGc43UHh3rUg15Za/5CDP9 aOxXZKuTfkk9ilTT3dLYZv/TpL74JrHdBSJk01co4eMMWjUPL4eh8o29wZ9/aSZXqB+3 SxvE30csRDkES7NgBYzTvwwWxUYldUx0UYL/Fl0k6v/1/Fi2u3BTNHPlPKvXZGXVrvYV 4TLRrIB5Gyk81n8ODw4e8PCvSPbx62tYHx+dgG//6EIIepuhPdNgHV6AO3vM2ZrESjHy tPkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=kgNvjIWLJfU+SnbiEB+HNDdY21gzftp5UlZ1PdJ968Q=; b=Rc4uDcCeZUif/vm9+yKjjV22vH3xBTClyQIWsVnv4GwSdMP67StGPphFITETkxcNjl OWnaWJudLE+omQecPk5HHwsg1nYxh05003R6uyInujE7jsP+C4otGY8OwMv9gSP5P5Lm ZwxYcfq757qXT1JdxHI3/klF8HgSkM6tCfIHeHb2DP1619zKM+0BwWe7B3DSNAKlP7FA g0Wp+ssk3Bd3eKxwlFO+Oq2gktHCtX0ZryQjns+2PSRP3207NbX0iUW7GedCd7stgtL2 785TiC2d0RrX1hrkqUZdSqpM2ZBxxV/UB2+hsS18QT07XCJP7SY+DKyqrzeR1d+pfKuL iJ/A== X-Gm-Message-State: AIkVDXKrqu+elFqbZelsZlsOICenCxi+GKMAC7gQnd7Tv1JpQ1znuSRGJ1aKMp5NYyg9YaaLOPcft1ddPPOkNg== X-Received: by 10.55.221.5 with SMTP id n5mr11251131qki.58.1484200233639; Wed, 11 Jan 2017 21:50:33 -0800 (PST) MIME-Version: 1.0 Received: by 10.200.44.227 with HTTP; Wed, 11 Jan 2017 21:50:32 -0800 (PST) Received: by 10.200.44.227 with HTTP; Wed, 11 Jan 2017 21:50:32 -0800 (PST) In-Reply-To: References: From: Magnus Hagander Date: Thu, 12 Jan 2017 06:50:32 +0100 Message-ID: Subject: Re: Building server without Apache To: Dave Page Cc: Josh Berkus , pgadmin-hackers Content-Type: multipart/alternative; boundary=001a11466622b3b9990545df4b23 X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org --001a11466622b3b9990545df4b23 Content-Type: text/plain; charset=UTF-8 On Jan 12, 2017 4:56 AM, "Dave Page" wrote: On Thu, Jan 12, 2017 at 7:42 AM, Josh Berkus wrote: > Pgadmin gurus: > > I'm trying to create a canonical container image for pgAdmin4 Server. > However, using Apache is kind of heavyweight for a container. Has > anyone run pgAdmin4 against something lighter weight? If memory serves, the reason why we recommend Apache is that at the time I last tested, it was the only one of Apache, Lighttpd and Nginx which would support single-process, multi-thread WSGI apps. Having a single process is essential, due to the global connection manager used by pgAdmin - it's the only way we can guarantee affinity between the user session and the database session. If you can make that work with servers other than Apache (someone recently suggested Gunicorn might be able to help), then I'd love to hear about it. There are no other special requirements of pgAdmin, so really that's all that stands in your way. Uwsgi might also be worth investigating. It's pretty light and supports an hybrid model where ISTM it would work if you just set number of processes to 1 (but I haven't tried it with pgadmin specifically. /Magnus --001a11466622b3b9990545df4b23 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Jan 12, 2017 4:56 AM, "Dave Page" <dpage@pgadmin.org> wrote:
On Thu, Jan 12, 20= 17 at 7:42 AM, Josh Berkus <josh@berk= us.org> wrote:
> Pgadmin gurus:
>
> I'm trying to create a canonical container image for pgAdmin4 Serv= er.
> However, using Apache is kind of heavyweight for a container.=C2=A0 Ha= s
> anyone run pgAdmin4 against something lighter weight?

If memory serves, the reason why we recommend Apache is that at the time I last tested, it was the only one of Apache, Lighttpd and Nginx
which would support single-process, multi-thread WSGI apps.

Having a single process is essential, due to the global connection
manager used by pgAdmin - it's the only way we can guarantee affinity between the user session and the database session. If you can make
that work with servers other than Apache (someone recently suggested
Gunicorn might be able to help), then I'd love to hear about it. There<= br> are no other special requirements of pgAdmin, so really that's all
that stands in your way.

Uwsgi might also be w= orth investigating. It's pretty light and supports an hybrid model wher= e ISTM it would work if you just set number of processes to 1 (but I haven&= #39;t tried it with pgadmin specifically.=C2=A0

=
/Magnus

--001a11466622b3b9990545df4b23--