This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const AWS = require('aws-sdk'); | |
const ssm = new AWS.SSM(); | |
const SSM_DOCUMENT_NAME = process.env.SSM_DOCUMENT_NAME; | |
const SNS_TARGET = process.env.SNS_TARGET; | |
function sleep(ms) { | |
return new Promise((resolve) => { | |
setTimeout(resolve, ms); | |
}); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I spent 2 hours+ and got stress about this issue: warning: daemon connect(fd=5 uds=/tmp/.newrelic.sock) returned -1 errno=ECONNREFUSED. Failed to connect to the newrelic-daemon. Please make sure that there is a properly configured newrelic-daemon running. For additional assistance, please see: https://newrelic.com/docs/php/newrelic-daemon-startup-modes | |
These are the steps to solve the issue: | |
> Check process using command: ps aux | grep newrelic | |
> Kill all newrelic-daemon process. | |
> Restart web server using command: service php-fpm restart && service nginx restart | |
> Newrelic daemon will automatically restart. | |
And, voila! (: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# try to find if this is an inodes problem | |
df -ih | |
# find list directories of inode | |
du --inodes -d 3 /home/htdocs | sort -n | tail | |
# try to find root folders with large inodes count | |
for i in /*; do echo $i; find $i |wc -l; done | |
# try to find specific folders: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Notes: | |
execute the function twice to see if the variable values are changed or not. | |
I did not bother with creating additional foreach queries for before and after. | |
If you exceed either the minimum or maximum values the Min|Max value will be used instead of your value. | |
integer is in bytes: 1024 = 1KB | 1073741824 = 1GB | |
max_allowed_packet | |
Permitted Values Type integer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To change the jenkins user, open the /etc/sysconfig/jenkins (in debian this file is created in /etc/default) and change the JENKINS_USER to whatever you want. Make sure that user exists in the system (you can check the user in the /etc/passwd file ). | |
$JENKINS_USER="manula" | |
Then change the ownership of the Jenkins home, Jenkins webroot and logs. | |
chown -R manula:manula /var/lib/jenkins | |
chown -R manula:manula /var/cache/jenkins | |
chown -R manula:manula /var/log/jenkins | |
Then restarted the Jenkins jenkins and check the user has changed using a ps command | |
/etc/init.d/jenkins restart | |
ps -ef | grep jenkins |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[program:sleekr-staging] | |
process_name=%(program_name)s_%(process_num)02d | |
command=php artisan queue:work --queue=staging1 --daemon --sleep=3 --tries=3 | |
directory=/home/htdocs/deploy/staging/backend/current | |
stdout_logfile=/home/htdocs/deploy/staging/logs/supervisord.log | |
user=sleekr | |
redirect_stderr=true | |
autostart=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql --max_allowed_packet=100M -u root -p database < dump.sql | |
Also, change the my.cnf or my.ini file under the mysqld section and set: | |
max_allowed_packet=100M | |
or command MySQL: | |
set global net_buffer_length=1000000; | |
set global max_allowed_packet=1000000000; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// set variable windows to non-space folder | |
setx VAGRANT_HOME "drive:\path" /M | |
// install plugin | |
vagrant plugin install vagrant-winnfsd | |
vagrant plugin install vagrant-vbguest | |
//edit vagrant config | |
config.winnfsd.logging = "on" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add line below: | |
net.ipv6.conf.all.disable_ipv6 = 1 | |
net.ipv6.conf.default.disable_ipv6 = 1 | |
net.ipv6.conf.lo.disable_ipv6 = 1 | |
# restart: sudo sysctl -p |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql -u homestead -psecret -e "select @@sql_mode" | |
+-------------------------------------------------------------------------------------------------------------------------------------------+ | |
| @@sql_mode | | |
+-------------------------------------------------------------------------------------------------------------------------------------------+ | |
| ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | | |
+-------------------------------------------------------------------------------------------------------------------------------------------+ | |
[mysqld] | |
# ... other stuff will probably be here | |
sql_mode = "STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" |
NewerOlder