Updates from February, 2015 Toggle Comment Threads | Keyboard Shortcuts

  • gio 7:44 pm on February 2, 2015 Permalink | Reply
    Tags:   

    OL tracking app response time on nginx 

    To track the response time let’s edit

    /etc/nginx/nginx.conf

    adding the $request_time to the log_format line:

    
        log_format iacombined '$seed$remote_addr $host $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" $request_time';
    

    Note: $request_time includes the time to complete sending the data to the client.

    To show the requests longer than 3 seconds:

    sudo tail -F /var/log/nginx/access.log -s 0.1  | perl -ne '$|=1; $_ =~ / ([^ ]+$)/; if ($1 > 3.0) {print;}'

    To show the requests longer than 3 second, hiding the 400 errors:

    sudo tail -F /var/log/nginx/access.log -s 0.1  | grep -v '"-" 40. 0' --line-buffered | perl -ne '$|=1; $_ =~ / ([^ ]+$)/; if ($1 > 3.0) {print;}'
     
  • gio 11:01 pm on January 27, 2015 Permalink | Reply
    Tags:   

    OL: main backups location 

    :: ol-home

    The main backup files are located at

    username@ol-home:/1$
    • /1/postgres_backups/backups$

      contains the postgres database dumps for openlibrary and coverstore databases.

    • /1/postgres_backups/base_backups$

      is a copy of the postgres database directory. Very useful for restoring in case of crashes.

    • /1/postgres_backups/pg_xlog_archive$

      Postgres maintains Write-Ahead-Log (WAL) files. They are used in replication and for point-in-time recovery (restore the database to a timestamp).

    If there are issues about the generation of the backup files please be sure the folder /olsystem/etc/crond.d/pg-backups has permits 644.

     
  • gio 10:40 pm on January 20, 2015 Permalink | Reply
    Tags:   

    OL: how to merge and deploy a pull request 

    First to freeze eventually local updates:

    git stash

    load locally the pull request code patch

    git checkout -b bmmcginty-overdriveSearchUrlChange master
    git pull https://github.com/bmmcginty/openlibrary.git overdriveSearchUrlChange

    mind to test the code and not just merge it from git website

    git checkout master
    git merge --no-ff bmmcginty-overdriveSearchUrlChange
    git push origin master   (pushing on my repo)
    git push archive master  (pushing on archive repo)

    now you can deploy the code

    to deploy openlibrary to all nodes:

    /olsystem/bin/deploy-code openlibrary

    to deploy olsystem to all nodes:

    /olsystem/bin/deploy-code olsystem
     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel