globaleaks / GlobaLeaks

GlobaLeaks is free, open source software enabling anyone to easily set up and maintain a secure whistleblowing platform.
https://www.globaleaks.org
Other
1.21k stars 267 forks source link

Arrange stress test on main and submission interface #499

Open fpietrosanti opened 11 years ago

fpietrosanti commented 11 years ago

In order to be sure that, following the public launch of partner-x website, globaleaks will support many requests all together, a stress test must be arranged.

This has to be implemented and executed in a timebox of less than 4 hours.

That's not the full stress test suite as defined on #426 .

This has to be done before public launch on production infrastructure.

fpietrosanti commented 11 years ago

A quick python or shell script of automation with curl or ab maybe enough

hellais commented 11 years ago

I wrote a python script to be able to stress test the submission interface: https://github.com/globaleaks/GlobaLeaks/blob/master/scripts/stresser.py

When running it I end up getting this error:

2013-08-25 15:07:31+0200 Unhandled Error
    Traceback (most recent call last):
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 524, in __bootstrap
        self.__bootstrap_inner()
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 551, in __bootstrap_inner
        self.run()
      File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 504, in run
        self.__target(*self.__args, **self.__kwargs)
    --- <exception caught here> ---
      File "/Users/y/.virtualenvs/glbackend/lib/python2.7/site-packages/twisted/python/threadpool.py", line 191, in _worker
        result = context.call(ctx, function, *args, **kwargs)
      File "/Users/y/.virtualenvs/glbackend/lib/python2.7/site-packages/twisted/python/context.py", line 118, in callWithContext
        return self.currentContext().callWithContext(ctx, func, *args, **kw)
      File "/Users/y/.virtualenvs/glbackend/lib/python2.7/site-packages/twisted/python/context.py", line 81, in callWithContext
        return func(*args,**kw)
      File "/Users/y/code/GL/GLBackend/globaleaks/settings.py", line 550, in _wrap
        self.store = self.get_store()
      File "/Users/y/code/GL/GLBackend/globaleaks/settings.py", line 543, in get_store
        return zstorm.get(GLSetting.store_name)
      File "/Users/y/.virtualenvs/glbackend/lib/python2.7/site-packages/storm/zope/zstorm.py", line 177, in get
        return self.create(name, default_uri)
      File "/Users/y/.virtualenvs/glbackend/lib/python2.7/site-packages/storm/zope/zstorm.py", line 153, in create
        store = Store(database)
      File "/Users/y/.virtualenvs/glbackend/lib/python2.7/site-packages/storm/store.py", line 73, in __init__
        self._connection = database.connect(self._event)
      File "/Users/y/.virtualenvs/glbackend/lib/python2.7/site-packages/storm/database.py", line 493, in connect
        return self.connection_factory(self, event)
      File "/Users/y/.virtualenvs/glbackend/lib/python2.7/site-packages/storm/database.py", line 188, in __init__
        self._raw_connection = self._database.raw_connect()
      File "/Users/y/.virtualenvs/glbackend/lib/python2.7/site-packages/storm/databases/sqlite.py", line 192, in raw_connect
        isolation_level=None)
    pysqlite2.dbapi2.OperationalError: unable to open database file

I will continue doing a bit more testing and see what else comes up.

fpietrosanti commented 11 years ago

What the stress test script test? Does it also make concurrency (like 100/200 parallel connection) testing?

hellais commented 11 years ago

@fpietrosanti

Read the source luke

https://github.com/globaleaks/GlobaLeaks/blob/master/scripts/stresser.py#L183

https://github.com/globaleaks/GlobaLeaks/blob/master/scripts/stresser.py#L189

fpietrosanti commented 11 years ago

@vecna did you managed to test/stress test fixing the exceptions?

vecna commented 11 years ago

No, its something that require a deep twisted debug skill, I've start with few result in the few moment given. we'll talk about assignment

fpietrosanti commented 11 years ago

@evilalive , there is vecna that can reproduce this on linux

evilaliv3 commented 11 years ago

@vecna can you give additional infos?

how can i get the same "pysqlite2.dbapi2.OperationalError: unable to open database file" ?

evilaliv3 commented 10 years ago

this is related to: https://github.com/globaleaks/GlobaLeaks/issues/768