Issue with grafana graphite database and graphics metrics

The “Database table is locked” message is just a warning and Grafana automatically retries. This is a limitation of using Sqlite as the backend db. If you have lots of people saving dashboards then this could be a problem but then you will see errors and not just the warning. So this has nothing to do with your problem.

A 502 error means that the connection between Grafana and Graphite does not work.