Durante a instalação inicial e configuração do Graphite no CentOS 6.4 usando o Apache mod_wsgi por meio do estoque graphite-web rpm, recebo a seguinte mensagem " DatabaseError: database is locked ":
mod_wsgi (pid=9009): Target WSGI script '/usr/share/graphite/graphite-web.wsgi' cannot be loaded as Python module.
mod_wsgi (pid=9009): Exception occurred processing WSGI script '/usr/share/graphite/graphite-web.wsgi'.
Traceback (most recent call last):
File "/usr/share/graphite/graphite-web.wsgi", line 16, in <module>
import graphite.metrics.search
File "/usr/lib/python2.6/site-packages/graphite/metrics/search.py", line 6, in <module>
from graphite.storage import is_pattern, match_entries
File "/usr/lib/python2.6/site-packages/graphite/storage.py", line 7, in <module>
from graphite.remote_storage import RemoteStore
File "/usr/lib/python2.6/site-packages/graphite/remote_storage.py", line 8, in <module>
from graphite.util import unpickle
File "/usr/lib/python2.6/site-packages/graphite/util.py", line 82, in <module>
defaultProfile.save()
File "/usr/lib/python2.6/site-packages/django/db/models/base.py", line 460, in save
self.save_base(using=using, force_insert=force_insert, force_update=force_update)
File "/usr/lib/python2.6/site-packages/django/db/models/base.py", line 553, in save_base
result = manager._insert(values, return_id=update_pk, using=using)
File "/usr/lib/python2.6/site-packages/django/db/models/manager.py", line 195, in _insert
return insert_query(self.model, values, **kwargs)
File "/usr/lib/python2.6/site-packages/django/db/models/query.py", line 1436, in insert_query
return query.get_compiler(using=using).execute_sql(return_id)
File "/usr/lib/python2.6/site-packages/django/db/models/sql/compiler.py", line 791, in execute_sql
cursor = super(SQLInsertCompiler, self).execute_sql(None)
File "/usr/lib/python2.6/site-packages/django/db/models/sql/compiler.py", line 735, in execute_sql
cursor.execute(sql, params)
File "/usr/lib/python2.6/site-packages/django/db/backends/util.py", line 34, in execute
return self.cursor.execute(sql, params)
File "/usr/lib/python2.6/site-packages/django/db/backends/sqlite3/base.py", line 234, in execute
return Database.Cursor.execute(self, query, params)
DatabaseError: database is locked
Eu verifiquei que o arquivo DB (" /var/lib/graphite-web/graphite.db ") é acessível pelo apache usuário que possui o arquivo Processo de link .
Além disso, tentei reiniciar os processos link e cache de carbono como mencionado em esta discussão no github .
Uma lista de lsof mostra o seguinte:
# lsof | grep graphite.db
httpd 9006 apache 17u REG 253,2 69632 526186 /var/lib/graphite-web/graphite.db
httpd 9007 apache 17u REG 253,2 69632 526186 /var/lib/graphite-web/graphite.db
httpd 9008 apache 17u REG 253,2 69632 526186 /var/lib/graphite-web/graphite.db
httpd 9008 apache 22u REG 253,2 69632 526186 /var/lib/graphite-web/graphite.db
httpd 9009 apache 17u REG 253,2 69632 526186 /var/lib/graphite-web/graphite.db
httpd 9009 apache 22u REG 253,2 69632 526186 /var/lib/graphite-web/graphite.db
httpd 9010 apache 17ur REG 253,2 69632 526186 /var/lib/graphite-web/graphite.db
httpd 9010 apache 18u REG 253,2 512 526174 /var/lib/graphite-web/graphite.db-journal
httpd 9010 apache 24ur REG 253,2 69632 526186 /var/lib/graphite-web/graphite.db
httpd 9011 apache 17u REG 253,2 69632 526186 /var/lib/graphite-web/graphite.db
httpd 9012 apache 17u REG 253,2 69632 526186 /var/lib/graphite-web/graphite.db
httpd 9013 apache 17u REG 253,2 69632 526186 /var/lib/graphite-web/graphite.db
Na minha cabeça, isso deve estar relacionado ao link , mas eu não estou chegando a lugar nenhum com ele.