Category Archives: Hosting

Discourse – email and Job exception: Net::ReadTimeout

 

Email

For a Discourse instance to function properly Email must be set up. Use the SMTP_URL env var to set your SMTP address, see sample templates for an example. The Docker image does not contain postfix, exim or another MTA, it was omitted because it is very tricky to set up correctly.

Source: https://github.com/discourse/discourse_docker

Yah! Discourse doesn’t came with any MTA (mail transfer agent).
I had to install Postfix so that Discourse could send out emails.

My emails weren’t getting delivered…
I was getting the following error on discourse logs(/var/discourse/shared/standalone/log/rails/production.log)….

Job exception: Net::ReadTimeout

After a few tweaks… I got it working…
This is my /var/discourse/containers/app.yml excerpt….

## TODO: List of comma delimited emails that will be made admin and developer
 ## on initial signup example [email protected],[email protected]'
 DISCOURSE_DEVELOPER_EMAILS: [email protected]'

## TODO: The SMTP mail server used to validate new accounts and send notifications
 DISCOURSE_SMTP_ADDRESS: mail.domain.com
 DISCOURSE_SMTP_PORT: 25
 DISCOURSE_SMTP_USER_NAME: [email protected]
 DISCOURSE_SMTP_PASSWORD: XXXXXXX
 DISCOURSE_SMTP_ENABLE_START_TLS: false
Rebuild the APP
cd /var/discourse/
./launcher rebuild app
Readings

 

Stack Overflow: The Architecture – 2016 Edition

 

So what’s changed in the last 2 years? Besides replacing some servers and network gear, not much. Here’s a top-level list of hardware that runs the sites today (noting what’s different since 2013):

  • 4 Microsoft SQL Servers (new hardware for 2 of them)

  • 11 IIS Web Servers (new hardware)

  • 2 Redis Servers (new hardware)

  • 3 Tag Engine servers (new hardware for 2 of the 3)

  • 3 Elasticsearch servers (same)

  • 4 HAProxy Load Balancers (added 2 to support CloudFlare)

  • 2 Networks (each a Nexus 5596 Core + 2232TM Fabric Extenders, upgraded to 10Gbps everywhere)

  • 2 Fortinet 800C Firewalls (replaced Cisco 5525-X ASAs)

  • 2 Cisco ASR-1001 Routers (replaced Cisco 3945 Routers)

  • 2 Cisco ASR-1001-x Routers (new!)

 


Full article http://nickcraver.com/blog/2016/02/17/stack-overflow-the-architecture-2016-edition/

ERROR 502 – connect() to unix:/var/run/php5-fpm.sock failed (11: Resource temporarily unavailable) while connecting to upstream

 

2015/11/24 12:01:49 [error] 48055#0: *14094117 connect() to unix:/var/run/php5-fpm.sock failed (11: Resource temporarily unavailable) while connecting to upstream, client:

Once again, i’m struggling with nginx + php-fpm

sudo nano /etc/php5/fpm/pool.d/www.conf

search for

listen = /var/run/php5-fpm.sock

and replace it for

listen = 127.0.0.1:7777

On the *.conf files of sites-enabled (/etc/nginx/sites-enabled/)

replace (or comment)

fastcgi_pass unix:/var/run/php5-fpm.sock;

with

fastcgi_pass 127.0.0.1:7777;

More readings

Esoterica – acesso externo ao MySQL em alojamentos partilhados

Em ‘tuguês…
básicamente é o seguinte:

Boa tarde,

Informamos que o acesso externo ao MySQL em alojamentos partilhados Esoterica encontra-se bloqueado por questões de segurança.

A gestão da base de dados deverá ser efectuado através do phpMyAdmin disponível no painel de controlo da sua conta de alojamento.

Se necessitar de esclarecimentos adicionais não hesite em contactar-nos.

Cumprimentos,