Re: [web2py] Re: Web2py freezing

2016-10-25 Thread piero crisci
The pool number is set to 10 .
I tried also with 10 worker threads
For what can i see there is something wrong in my app.
The example app and a wizard app are correctly processed.
Also the static pages like .html are fast rendered instead the pages 
rendered by the controller are very slow

default/index
*DYNAMIC PAGE DEFAULT/INDEX*
Server Software:Apache/2.4.23
Server Hostname:10.51.130.53
Server Port:80

Document Path:  /
Document Length:6381 bytes

Concurrency Level:  10
Time taken for tests:   3.454 seconds
Complete requests:  10
Failed requests:1
   (Connect: 0, Receive: 0, Length: 1, Exceptions: 0)
Total transferred:  68429 bytes
HTML transferred:   63809 bytes
*Requests per second:2.90 [#/sec] (mean)*


*STATIC PAGE INDEX.HTML (HELLO WORLD)*


Server Software:Apache/2.4.23
Server Hostname:10.51.130.53
Server Port:80

Document Path:  /Prototipo_RCG/static/downloads/index.html
Document Length:13 bytes

Concurrency Level:  10
Time taken for tests:   0.016 seconds
Complete requests:  10
Failed requests:0
Non-2xx responses:  10
Total transferred:  2640 bytes
HTML transferred:   130 bytes
*Requests per second:639.59 [#/sec] (mean)*
*Time per request:   15.635 [ms] (mean)*
*Time per request:   1.563 [ms] (mean, across all concurrent requests)*
*Transfer rate:  164.89 [Kbytes/sec] received*

It seem application is slow interpreting .pyc files


Il giorno martedì 25 ottobre 2016 10:56:21 UTC+2, mcm ha scritto:
>
> [Fri Oct 21 18:02:29.083973 2016] [mpm_winnt:notice] [pid 620:tid 320] 
> AH00354: Child: Starting 250 worker threads.
>
> This is a ridiculous high number of threads! ;-)
>
> If 10 is the magic number try looking at the pool number in your 
> appconfig.ini.
>
> If you need high concurrency try avoiding threads and use processes, 
> unless you are prepared to avoid mutexes anywhere in your code.
> So you may look into using uwsgi, gunicorn or other webservers that can 
> fork instead of threading.
> Uwsgi can be used alone or coupled with nginx. The latter if you need to 
> serve lots of static contents.
> Keep in mind that *real* concurrency is bound to the number of available 
> cores of your CPUs if you use too many threads and/or too many processes 
> you are going to have troubles if there is any resource 
> contention, synchronization, happening
>
> If all of the above does not work, try using a Linux distribution... and 
> if that problem persists, you need to show us the code!
>
> ciao,
> mic
>
> 2016-10-25 8:56 GMT+02:00 piero crisci >
> :
>
>> Hi massimo and thanks fot the hint
>> I tried with rocket from cmd line and this is result from Apache ab 
>> command line.
>> I got the same result i have with APACHE WSGI as you can see below
>>
>>
>> *MY APP WITH ROCKET *
>> This is the command launch
>> C:\web2py>python web2py.py
>> *No handlers could be found for logger "web2py"*
>> web2py Web Framework
>> Created by Massimo Di Pierro, Copyright 2007-2016
>> *Version 2.14.3-stable+timestamp.2016.03.26.23.02.0*2
>> Database drivers available: sqlite3, imaplib, pyodbc, pymysql, pg8000
>> please visit:
>> http://10.51.130.53/
>> starting browser...
>> please visit:
>> http://10.51.130.53:8080/
>> starting browser...
>>
>>
>> C:\Apache24\bin>ab -n 270 -c 90 -k -s 100 
>> 10.51.130.53:8080/Prototipo_RCG/defaul
>> t/index
>> This is ApacheBench, Version 2.3 <$Revision: 1748469 $>
>> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
>> Licensed to The Apache Software Foundation, http://www.apache.org/
>>
>> Benchmarking 10.51.130.53 (be patient)
>> Completed 100 requests
>> Completed 200 requests
>> Finished 270 requests
>>
>>
>> Server Software:Rocket
>> Server Hostname:10.51.130.53
>> Server Port:8080
>>
>> Document Path:  /Prototipo_RCG/default/index
>> Document Length:6437 bytes
>>
>> Concurrency Level:  90
>> Time taken for tests:   115.700 seconds
>> Complete requests:  270
>> Failed requests:43
>>(Connect: 0, Receive: 0, Length: 43, Exceptions: 0)
>> Keep-Alive requests:0
>> Total transferred:  1856249 bytes
>> HTML transferred:   1737989 bytes
>> *Requests per second:2.33 [#/sec] (mean)*
>> *Time per request:   38566.756 [ms] (mean)*
>> *Time per request:   428.520 [ms] (mean, across all concurrent 
>> requests)*
>> *Transfer rate:  15.67 [Kbytes/sec] received*
>>
>> Connection Times (ms)
>>   min  mean[+/-sd] median   max
>>
>>
>> *WINDOWS GENERIC WEB2PY APP FROM WEB2PY.EXE*
>> C:\Apache24\bin>ab -n 270 -c 90 -k -s 100 
>> 10.51.130.53:8080/welcome/default/inde
>> x
>> This is ApacheBench, Version 2.3 <$Revision: 1748469 $>
>> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
>> Licensed to The Apache Software Foundation, http://www.apache.org/
>>
>> Benchmarking 1

Re: [web2py] Re: Web2py freezing

2016-10-25 Thread Michele Comitini
[Fri Oct 21 18:02:29.083973 2016] [mpm_winnt:notice] [pid 620:tid 320]
AH00354: Child: Starting 250 worker threads.

This is a ridiculous high number of threads! ;-)

If 10 is the magic number try looking at the pool number in your
appconfig.ini.

If you need high concurrency try avoiding threads and use processes, unless
you are prepared to avoid mutexes anywhere in your code.
So you may look into using uwsgi, gunicorn or other webservers that can
fork instead of threading.
Uwsgi can be used alone or coupled with nginx. The latter if you need to
serve lots of static contents.
Keep in mind that *real* concurrency is bound to the number of available
cores of your CPUs if you use too many threads and/or too many processes
you are going to have troubles if there is any resource
contention, synchronization, happening

If all of the above does not work, try using a Linux distribution... and if
that problem persists, you need to show us the code!

ciao,
mic

2016-10-25 8:56 GMT+02:00 piero crisci :

> Hi massimo and thanks fot the hint
> I tried with rocket from cmd line and this is result from Apache ab
> command line.
> I got the same result i have with APACHE WSGI as you can see below
>
>
> *MY APP WITH ROCKET *
> This is the command launch
> C:\web2py>python web2py.py
> *No handlers could be found for logger "web2py"*
> web2py Web Framework
> Created by Massimo Di Pierro, Copyright 2007-2016
> *Version 2.14.3-stable+timestamp.2016.03.26.23.02.0*2
> Database drivers available: sqlite3, imaplib, pyodbc, pymysql, pg8000
> please visit:
> http://10.51.130.53/
> starting browser...
> please visit:
> http://10.51.130.53:8080/
> starting browser...
>
>
> C:\Apache24\bin>ab -n 270 -c 90 -k -s 100 10.51.130.53:8080/Prototipo_
> RCG/defaul
> t/index
> This is ApacheBench, Version 2.3 <$Revision: 1748469 $>
> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
> Licensed to The Apache Software Foundation, http://www.apache.org/
>
> Benchmarking 10.51.130.53 (be patient)
> Completed 100 requests
> Completed 200 requests
> Finished 270 requests
>
>
> Server Software:Rocket
> Server Hostname:10.51.130.53
> Server Port:8080
>
> Document Path:  /Prototipo_RCG/default/index
> Document Length:6437 bytes
>
> Concurrency Level:  90
> Time taken for tests:   115.700 seconds
> Complete requests:  270
> Failed requests:43
>(Connect: 0, Receive: 0, Length: 43, Exceptions: 0)
> Keep-Alive requests:0
> Total transferred:  1856249 bytes
> HTML transferred:   1737989 bytes
> *Requests per second:2.33 [#/sec] (mean)*
> *Time per request:   38566.756 [ms] (mean)*
> *Time per request:   428.520 [ms] (mean, across all concurrent
> requests)*
> *Transfer rate:  15.67 [Kbytes/sec] received*
>
> Connection Times (ms)
>   min  mean[+/-sd] median   max
>
>
> *WINDOWS GENERIC WEB2PY APP FROM WEB2PY.EXE*
> C:\Apache24\bin>ab -n 270 -c 90 -k -s 100 10.51.130.53:8080/welcome/
> default/inde
> x
> This is ApacheBench, Version 2.3 <$Revision: 1748469 $>
> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
> Licensed to The Apache Software Foundation, http://www.apache.org/
>
> Benchmarking 10.51.130.53 (be patient)
> Completed 100 requests
> Completed 200 requests
> Finished 270 requests
>
>
> Server Software:Rocket
> Server Hostname:10.51.130.53
> Server Port:8080
>
> Document Path:  /welcome/default/index
> Document Length:11001 bytes
>
> Concurrency Level:  90
> Time taken for tests:   18.046 seconds
> Complete requests:  270
> Failed requests:0
> Keep-Alive requests:0
> Total transferred:  3087180 bytes
> HTML transferred:   2970270 bytes
> *Requests per second:14.96 [#/sec] (mean)*
> *Time per request:   6015.390 [ms] (mean)*
> *Time per request:   66.838 [ms] (mean, across all concurrent
> requests)*
> *Transfer rate:  167.06 [Kbytes/sec] received*
>
> Connection Times (ms)
>   min  mean[+/-sd] median   max
> Connect:0   34 127.0  0 516
> Processing:  3046 4541 915.5   41566231
> Waiting: 2035 4114 1126.0   37966231
> Total:   3046 4575 902.1   44846231
>
> Percentage of the requests served within a certain time (ms)
>   50%   4484
>   66%   4597
>   75%   5082
>   80%   5582
>   90%   6106
>   95%   6137
>   98%   6168
>   99%   6184
>  100%   6231 (longest request)
>
> *GENERAL APP **WITH LAST VERSION OF WEB2PY **STARTED FROM CODE WEB2PY.PY*
>
> C:\Apache24\bin>ab -n 270 -c 90 -k -s 100 10.51.130.53:8080/welcome/
> default/index
>
> This is ApacheBench, Version 2.3 <$Revision: 1748469 $>
> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
> Licensed to The Apache Software Foundation, http://www.apache.org/
>
> Benchmarking 10.51.130.53 (be patient)
> Completed 100 requests
> Completed 200 requests
> Finished 270 reques

[web2py] Re: Web2py freezing

2016-10-24 Thread piero crisci
Hi massimo and thanks fot the hint
I tried with rocket from cmd line and this is result from Apache ab command 
line.
I got the same result i have with APACHE WSGI as you can see below


*MY APP WITH ROCKET *
This is the command launch
C:\web2py>python web2py.py
*No handlers could be found for logger "web2py"*
web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2016
*Version 2.14.3-stable+timestamp.2016.03.26.23.02.0*2
Database drivers available: sqlite3, imaplib, pyodbc, pymysql, pg8000
please visit:
http://10.51.130.53/
starting browser...
please visit:
http://10.51.130.53:8080/
starting browser...


C:\Apache24\bin>ab -n 270 -c 90 -k -s 100 
10.51.130.53:8080/Prototipo_RCG/defaul
t/index
This is ApacheBench, Version 2.3 <$Revision: 1748469 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 10.51.130.53 (be patient)
Completed 100 requests
Completed 200 requests
Finished 270 requests


Server Software:Rocket
Server Hostname:10.51.130.53
Server Port:8080

Document Path:  /Prototipo_RCG/default/index
Document Length:6437 bytes

Concurrency Level:  90
Time taken for tests:   115.700 seconds
Complete requests:  270
Failed requests:43
   (Connect: 0, Receive: 0, Length: 43, Exceptions: 0)
Keep-Alive requests:0
Total transferred:  1856249 bytes
HTML transferred:   1737989 bytes
*Requests per second:2.33 [#/sec] (mean)*
*Time per request:   38566.756 [ms] (mean)*
*Time per request:   428.520 [ms] (mean, across all concurrent 
requests)*
*Transfer rate:  15.67 [Kbytes/sec] received*

Connection Times (ms)
  min  mean[+/-sd] median   max


*WINDOWS GENERIC WEB2PY APP FROM WEB2PY.EXE*
C:\Apache24\bin>ab -n 270 -c 90 -k -s 100 
10.51.130.53:8080/welcome/default/inde
x
This is ApacheBench, Version 2.3 <$Revision: 1748469 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 10.51.130.53 (be patient)
Completed 100 requests
Completed 200 requests
Finished 270 requests


Server Software:Rocket
Server Hostname:10.51.130.53
Server Port:8080

Document Path:  /welcome/default/index
Document Length:11001 bytes

Concurrency Level:  90
Time taken for tests:   18.046 seconds
Complete requests:  270
Failed requests:0
Keep-Alive requests:0
Total transferred:  3087180 bytes
HTML transferred:   2970270 bytes
*Requests per second:14.96 [#/sec] (mean)*
*Time per request:   6015.390 [ms] (mean)*
*Time per request:   66.838 [ms] (mean, across all concurrent requests)*
*Transfer rate:  167.06 [Kbytes/sec] received*

Connection Times (ms)
  min  mean[+/-sd] median   max
Connect:0   34 127.0  0 516
Processing:  3046 4541 915.5   41566231
Waiting: 2035 4114 1126.0   37966231
Total:   3046 4575 902.1   44846231

Percentage of the requests served within a certain time (ms)
  50%   4484
  66%   4597
  75%   5082
  80%   5582
  90%   6106
  95%   6137
  98%   6168
  99%   6184
 100%   6231 (longest request)

*GENERAL APP **WITH LAST VERSION OF WEB2PY **STARTED FROM CODE WEB2PY.PY*

C:\Apache24\bin>ab -n 270 -c 90 -k -s 100 
10.51.130.53:8080/welcome/default/index

This is ApacheBench, Version 2.3 <$Revision: 1748469 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 10.51.130.53 (be patient)
Completed 100 requests
Completed 200 requests
Finished 270 requests


Server Software:Rocket
Server Hostname:10.51.130.53
Server Port:8080

Document Path:  /welcome/default/inde
Document Length:66 bytes

Concurrency Level:  90
Time taken for tests:   8.229 seconds
Complete requests:  270
Failed requests:0
Non-2xx responses:  270
Keep-Alive requests:0
Total transferred:  105570 bytes
HTML transferred:   17820 bytes
*Requests per second:32.81 [#/sec] (mean)*
*Time per request:   2742.840 [ms] (mean)*
*Time per request:   30.476 [ms] (mean, across all concurrent requests)*
*Transfer rate:  12.53 [Kbytes/sec] received*

Connection Times (ms)
  min  mean[+/-sd] median   max
Connect:00   0.0  0   0
Processing:   297 2342 701.0   26882859
Waiting:  297 2341 701.0   26882859
Total:297 2342 701.0   26882859

Percentage of the requests served within a certain time (ms)
  50%   2688
  66%   2729
  75%   2744
  80%   2756
  90%   2781
  95%   2813
  98%   2844
  99%   2844
 100%   2859 (longest request)

I could depend on version? 


Il giorno martedì 25 ottobre 2016 07:16:08 UTC+2, Massimo Di Pierro ha 
scritto:
>
> Something is very wrong 

[web2py] Re: Web2py freezing

2016-10-24 Thread Massimo Di Pierro
Something is very wrong here and I do not know what it is. Why are you 
suing apache with WSCGI. This is not a recommended configuration. We do not 
support Apache any more and we never supported WSCGI. Can you try rocket 
and nginx?

On Monday, 24 October 2016 10:47:49 UTC-5, piero crisci wrote:
>
> I update the version and i tried also on a WINDOWS 7 with the same 
> configuration.
> Here is the difference beetwen the WINDOWS SERVER 2012R2 and WINDOWS 7 
> with the same configuration
>
> *APACHE*
>
> *Server version: Apache/2.4.23 (Win64)*
>
> *Server built:   Oct  1 2016 08:28:43*
>
> *Distributed by: The Apache Haus*
>
> *Compiled with:  Visual Studio 2008*
>
> *Server's Module Magic Number: 20120211:61*
>
> *Server loaded:  APR 1.5.2, APR-UTIL 1.5.4*
>
> *Compiled using: APR 1.5.2, APR-UTIL 1.5.4*
>
> *Architecture:   64-bit*
>
> *Server MPM: WinNT*
>
> *  threaded: yes (fixed thread count)*
>
> *forked: no*
>
> *Server compiled with*
>
> *-D APR_HAS_SENDFILE*
>
> *-D APR_HAS_MMAP*
>
> *-D APR_HAVE_IPV6 (IPv4-mapped addresses disabled)*
>
> *-D APR_HAS_OTHER_CHILD*
>
> *-D AP_HAVE_RELIABLE_PIPED_LOGS*
>
> *-D DYNAMIC_MODULE_LIMIT=256*
>
> *-D HTTPD_ROOT="/Apache24"*
>
> *-D HTTPD_EXEC="/Apache24/bin/httpd.exe"*
>
> *-D DEFAULT_PIDLOG="logs/httpd.pid"*
>
> *-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"*
>
> *-D DEFAULT_ERRORLOG="logs/error.log"*
>
> *-D AP_TYPES_CONFIG_FILE="conf/mime.types"*
>
> *-D SERVER_CONFIG_FILE="conf/httpd.conf"*
>
>  
>
> ** The Apache Haus*
>
> ** is not affiliated with, or endorsed by, the Apache Software Foundation.*
>
> ** Apache HTTP Server, Apache, and the Apache feather logo are trademarks 
> of*
>
> ** The Apache Software Foundation.*
>
>  
>
> *PYTHON*
>
> *Python 2.7.9 (default, Dec 10 2014, 12:28:03) [MSC v.1500 64 bit (AMD64)] 
> on win*
>
> *32*
>
> *Type "help", "copyright", "credits" or "license" for more information.*
>
> *>>> *
>
>  
>
> EPPURE LE PRESTAZIONI OTTENUTE SONO MOLTO DIVERSE
>
> *Di seguito un benchmarking con il comando di APACHE:*
>
>  
>
> *SERVER  **
>
>  
>
> *Concurrency Level:  90*
>
> *Time taken for tests:   131.909 seconds*
>
> *Complete requests:  270*
>
> *Failed requests:45*
>
> *   (Connect: 0, Receive: 0, Length: 45, Exceptions: 0)*
>
> *Keep-Alive requests:0*
>
> *Total transferred:  1834657 bytes*
>
> *HTML transferred:   1710187 bytes*
>
> *Requests per second:2.05 [#/sec] (mean)*
>
> *Time per request:   43969.754 [ms] (mean)*
>
> *Time per request:   488.553 [ms] (mean, across all concurrent 
> requests)*
>
> *Transfer rate:  13.58 [Kbytes/sec] received*
>
>  
>
> *MY MACHINE*
>
>  
>
> Concurrency Level:  90
>
> Time taken for tests:   28.872 seconds
>
> Complete requests:  2700
>
> Failed requests:0
>
> Non-2xx responses:  2700
>
> Keep-Alive requests:0
>
> Total transferred:  820800 bytes
>
> HTML transferred:   178200 bytes
>
> *Requests per second:93.52 [#/sec] (mean)*
>
> *Time per request:   962.384 [ms] (mean)*
>
> *Time per request:   10.693 [ms] (mean, across all concurrent 
> requests)*
>
> *Transfer rate:  27.76 [Kbytes/sec] received*
>
> Il giorno venerdì 21 ottobre 2016 12:47:48 UTC+2, 黄祥 ha scritto:
>>
>> perhaps its easier to give the error log rather than just the 
>> configuration, learn from a lot of discussion in this forum apache is not 
>> recommended
>>
>> best regards,
>> stifan
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web2py freezing

2016-10-24 Thread piero crisci


I update the version and i tried also on a WINDOWS 7 with the same 
configuration.
Here is the difference beetwen the WINDOWS SERVER 2012R2 and WINDOWS 7 with 
the same configuration

*APACHE*

*Server version: Apache/2.4.23 (Win64)*

*Server built:   Oct  1 2016 08:28:43*

*Distributed by: The Apache Haus*

*Compiled with:  Visual Studio 2008*

*Server's Module Magic Number: 20120211:61*

*Server loaded:  APR 1.5.2, APR-UTIL 1.5.4*

*Compiled using: APR 1.5.2, APR-UTIL 1.5.4*

*Architecture:   64-bit*

*Server MPM: WinNT*

*  threaded: yes (fixed thread count)*

*forked: no*

*Server compiled with*

*-D APR_HAS_SENDFILE*

*-D APR_HAS_MMAP*

*-D APR_HAVE_IPV6 (IPv4-mapped addresses disabled)*

*-D APR_HAS_OTHER_CHILD*

*-D AP_HAVE_RELIABLE_PIPED_LOGS*

*-D DYNAMIC_MODULE_LIMIT=256*

*-D HTTPD_ROOT="/Apache24"*

*-D HTTPD_EXEC="/Apache24/bin/httpd.exe"*

*-D DEFAULT_PIDLOG="logs/httpd.pid"*

*-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"*

*-D DEFAULT_ERRORLOG="logs/error.log"*

*-D AP_TYPES_CONFIG_FILE="conf/mime.types"*

*-D SERVER_CONFIG_FILE="conf/httpd.conf"*

 

** The Apache Haus*

** is not affiliated with, or endorsed by, the Apache Software Foundation.*

** Apache HTTP Server, Apache, and the Apache feather logo are trademarks 
of*

** The Apache Software Foundation.*

 

*PYTHON*

*Python 2.7.9 (default, Dec 10 2014, 12:28:03) [MSC v.1500 64 bit (AMD64)] 
on win*

*32*

*Type "help", "copyright", "credits" or "license" for more information.*

*>>> *

 

EPPURE LE PRESTAZIONI OTTENUTE SONO MOLTO DIVERSE

*Di seguito un benchmarking con il comando di APACHE:*

 

*SERVER  **

 

*Concurrency Level:  90*

*Time taken for tests:   131.909 seconds*

*Complete requests:  270*

*Failed requests:45*

*   (Connect: 0, Receive: 0, Length: 45, Exceptions: 0)*

*Keep-Alive requests:0*

*Total transferred:  1834657 bytes*

*HTML transferred:   1710187 bytes*

*Requests per second:2.05 [#/sec] (mean)*

*Time per request:   43969.754 [ms] (mean)*

*Time per request:   488.553 [ms] (mean, across all concurrent 
requests)*

*Transfer rate:  13.58 [Kbytes/sec] received*

 

*MY MACHINE*

 

Concurrency Level:  90

Time taken for tests:   28.872 seconds

Complete requests:  2700

Failed requests:0

Non-2xx responses:  2700

Keep-Alive requests:0

Total transferred:  820800 bytes

HTML transferred:   178200 bytes

*Requests per second:93.52 [#/sec] (mean)*

*Time per request:   962.384 [ms] (mean)*

*Time per request:   10.693 [ms] (mean, across all concurrent requests)*

*Transfer rate:  27.76 [Kbytes/sec] received*

Il giorno venerdì 21 ottobre 2016 12:47:48 UTC+2, 黄祥 ha scritto:
>
> perhaps its easier to give the error log rather than just the 
> configuration, learn from a lot of discussion in this forum apache is not 
> recommended
>
> best regards,
> stifan
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web2py freezing

2016-10-21 Thread piero crisci
I just checked error logs and i got this:

[Fri Oct 21 18:02:28.797956 2016] [wsgi:warn] [pid 4676:tid 436] mod_wsgi: 
Compiled for Python/2.7.9+.
[Fri Oct 21 18:02:28.798955 2016] [wsgi:warn] [pid 4676:tid 436] mod_wsgi: 
Runtime using Python/2.7.9.
[Fri Oct 21 18:02:28.799957 2016] [mpm_winnt:notice] [pid 4676:tid 436] 
AH00455: Apache/2.4.18 (Win64) mod_wsgi/4.4.6 Python/2.7.9 configured -- 
resuming normal operations
[Fri Oct 21 18:02:28.799957 2016] [mpm_winnt:notice] [pid 4676:tid 436] 
AH00456: Apache Lounge VC14 Server built: Dec  9 2015 11:13:29
[Fri Oct 21 18:02:28.799957 2016] [core:notice] [pid 4676:tid 436] AH00094: 
Command line: 'C:\\Apache24\\bin\\httpd.exe -d C:/Apache24'
[Fri Oct 21 18:02:28.799957 2016] [mpm_winnt:notice] [pid 4676:tid 436] 
AH00418: Parent: Created child process 620
[Fri Oct 21 18:02:29.050971 2016] [wsgi:warn] [pid 620:tid 320] mod_wsgi: 
Compiled for Python/2.7.9+.
[Fri Oct 21 18:02:29.051971 2016] [wsgi:warn] [pid 620:tid 320] mod_wsgi: 
Runtime using Python/2.7.9.
[Fri Oct 21 18:02:29.083973 2016] [mpm_winnt:notice] [pid 620:tid 320] 
AH00354: Child: Starting 250 worker threads.
[Fri Oct 21 18:02:57.639608 2016] [wsgi:error] [pid 620:tid 2416] No 
handlers could be found for logger "web2py"
Debugging i got just this error:
(OS 64)The specified network name is no longer available. : AH00341: 
winnt_accept: Asynchronous AcceptEx failed. 

Can' t understand why app is freezing. I just thinking is somenthing due to 
sessions or too much ajax calls




Il giorno venerdì 21 ottobre 2016 12:47:48 UTC+2, 黄祥 ha scritto:
>
> perhaps its easier to give the error log rather than just the 
> configuration, learn from a lot of discussion in this forum apache is not 
> recommended
>
> best regards,
> stifan
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web2py freezing

2016-10-21 Thread 黄祥
perhaps its easier to give the error log rather than just the 
configuration, learn from a lot of discussion in this forum apache is not 
recommended

best regards,
stifan

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Web2py freezing on live deployment!

2013-11-20 Thread Andrew Buchan
Hi Niphlod, what is asking for disasters? Bumping it up to 500? Can you
elaborate on why? (I'm all for avoiding disasters given what's been
happening!)
The server-status page was showing 150 worker threads active, except lots
of the seem not to be from proper requests. Here's my post on apachelounge
with more details: http://www.apachelounge.com/viewtopic.php?t=5655

Apache since became unresponsive again since, strangely I could still
access appadmin via local host, but pages in the main application weren't
responding, even from localhost... CPU and memory were both fine. Made me
wonder if I'm doing something stupid in something very top-level
application-wise (like in a model file or in layout.html), but I would
expect an error message in that case.

I'll look into clearing sessions, thanks for the tip.


On Wed, Nov 20, 2013 at 4:26 PM, Niphlod  wrote:

>
>
> On Wednesday, November 20, 2013 3:56:51 PM UTC+1, Andrew Buchan wrote:
>>
>> Further update:
>>
>> Apache did finally crash, with the following message:
>>
>> "Server ran out of threads to serve requests. Consider raising the
>> ThreadsPerChild setting"
>>
>> I've bumped that up to 500, and there are less than that number of users
>> on the system (although I understand there will be more than one connection
>> fired off per user/session).
>> But it crashed/became unresponsive again with no error message!
>>
> Asking for real disasters! Are you sure that there are more than 150
> (default) requests active ?
>
>
>>  Also, I leave sessions alone, but should I be clearing them?
>>
> Yep, you definitely should (as anyone in production)
>
>
>> Also also, I updated to the latest version of web2py and it seems someone
>> left a print statement in SQLFORM.grid() which prints every row! (Line 2373
>> in sqlhtml.py) I presume that if I were running that as a windows service
>> on rocket it would crash the moment you displayed a grid..
>>
>
> known issue. Upgrade to trunk
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/PEC1uLfzlrU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Web2py freezing on live deployment!

2013-11-20 Thread Niphlod


On Wednesday, November 20, 2013 3:56:51 PM UTC+1, Andrew Buchan wrote:
>
> Further update:
>  
> Apache did finally crash, with the following message:
>  
> "Server ran out of threads to serve requests. Consider raising the 
> ThreadsPerChild setting"
>  
> I've bumped that up to 500, and there are less than that number of users 
> on the system (although I understand there will be more than one connection 
> fired off per user/session).
> But it crashed/became unresponsive again with no error message!
>
Asking for real disasters! Are you sure that there are more than 150 
(default) requests active ?
 

>  Also, I leave sessions alone, but should I be clearing them?
>
Yep, you definitely should (as anyone in production)
 

> Also also, I updated to the latest version of web2py and it seems someone 
> left a print statement in SQLFORM.grid() which prints every row! (Line 2373 
> in sqlhtml.py) I presume that if I were running that as a windows service 
> on rocket it would crash the moment you displayed a grid..
>

known issue. Upgrade to trunk 

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Web2py freezing on live deployment!

2013-11-20 Thread Andrew Buchan


Further update:
 
Apache did finally crash, with the following message:
 
"Server ran out of threads to serve requests. Consider raising the 
ThreadsPerChild setting"
 
I've bumped that up to 500, and there are less than that number of users on 
the system (although I understand there will be more than one connection 
fired off per user/session).
But it crashed/became unresponsive again with no error message!
 
I added mod_status to see what's going on, and it seems there are loads of 
requests being sent to which never exit, and I can't tell where these are 
being fired from as they don't indicate which virtualhost they came from 
(and no url mapping). I'm waiting for approval to join apachelounge to ask 
over there, but thought I'd ask here if anyone had any information on how 
web2py uses/creates requests/threads in apache, and how it could be that 
apache becomes unresponsive after a while. I'm not even sure it is running 
out of workerthreads (I thought servers queued requests till threads became 
available specifically so they wouldn't crash under heavy load).

Also, I leave sessions alone, but should I be clearing them?
 
Also also, I updated to the latest version of web2py and it seems someone 
left a print statement in SQLFORM.grid() which prints every row! (Line 2373 
in sqlhtml.py) I presume that if I were running that as a windows service 
on rocket it would crash the moment you displayed a grid...

>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Re: Web2py freezing on live deployment!

2013-11-15 Thread Derek
That's cool, I was just asking about the side project of Niphlod's to look 
at the pytds so that we could finally have a pure python database adapter. 
With a pure python adapter, gevent could properly use greenlets to make 
database queries, thus there would be no blocking on the queries.

On Friday, November 15, 2013 10:30:28 AM UTC-7, Andrew Buchan wrote:
>
> Hi Derek, the install on Apache is running fine and the ajax issue it 
> threw up I was able to fix as described above. So my problem is solved, but 
> thanks for checking in again. 
> I found that after updating to the latest version of web2py, it was easy 
> to get apache running following the deployment recipes (I skipped the SSL 
> part) whereas with the older version I had previously, I had to do a few 
> hacks to get it to work.
> I've not done anything since to determine what went wrong with Rocket in 
> the first place, and to be honest am not able to justify spending time 
> investigating what went wrong seeing as I have a working alternative (and 
> been busy trying to make up for lost time!)
>
> Let me know if you want a copy of my httpd.conf file (anyone).
>
>
>
> On Thu, Nov 14, 2013 at 7:18 PM, Derek >wrote:
>
>> any luck?
>>
>>
>> On Thursday, November 7, 2013 12:26:44 AM UTC-7, Niphlod wrote:
>>>
>>> hard ? with DAL it's pretty easy if a module exposes the dbapi just 
>>> force the driver and implement the connect method and it's usually good to 
>>> go.
>>> I'll test it when I get back home.
>>>
>>  -- 
>> Resources:
>> - http://web2py.com
>> - http://web2py.com/book (Documentation)
>> - http://github.com/web2py/web2py (Source code)
>> - https://code.google.com/p/web2py/issues/list (Report Issues)
>> --- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "web2py-users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/web2py/PEC1uLfzlrU/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> web2py+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Re: Web2py freezing on live deployment!

2013-11-15 Thread Andrew Buchan
Hi Derek, the install on Apache is running fine and the ajax issue it threw
up I was able to fix as described above. So my problem is solved, but
thanks for checking in again.
I found that after updating to the latest version of web2py, it was easy to
get apache running following the deployment recipes (I skipped the SSL
part) whereas with the older version I had previously, I had to do a few
hacks to get it to work.
I've not done anything since to determine what went wrong with Rocket in
the first place, and to be honest am not able to justify spending time
investigating what went wrong seeing as I have a working alternative (and
been busy trying to make up for lost time!)

Let me know if you want a copy of my httpd.conf file (anyone).



On Thu, Nov 14, 2013 at 7:18 PM, Derek  wrote:

> any luck?
>
>
> On Thursday, November 7, 2013 12:26:44 AM UTC-7, Niphlod wrote:
>>
>> hard ? with DAL it's pretty easy if a module exposes the dbapi just
>> force the driver and implement the connect method and it's usually good to
>> go.
>> I'll test it when I get back home.
>>
>  --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/PEC1uLfzlrU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Web2py freezing on live deployment!

2013-11-14 Thread Derek
any luck?

On Thursday, November 7, 2013 12:26:44 AM UTC-7, Niphlod wrote:
>
> hard ? with DAL it's pretty easy if a module exposes the dbapi just 
> force the driver and implement the connect method and it's usually good to 
> go.
> I'll test it when I get back home.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Re: Web2py freezing on live deployment!

2013-11-08 Thread Andrew Buchan
Yes, I've been caught out by that quite a few times! Not a problem with
Apached I may add, the wsgi file redirects stdout to show up in the apache
error log, but I suppose you could point it anywhere really.


On Fri, Nov 8, 2013 at 12:31 PM, Tim Richardson wrote:

> I had a puzzling problem with 2.7.4 as a rocket service on Windows 2003,
>> but this was a problem with sqlform.grids. There was a print statement left
>> in code which caused the service to stop working. This cause doesn't match
>> with your insights into the problem, but I mention it anyway. You only see
>> the problem when web2py is running as a service (I use nssm to create the
>> service, but this is not relevant).
>>
>
>
>> The problem was very quickly fixed in trunk, but as far as I know the fix
>> is not in any stable version yet.
>>
>
>
>> I'm still using 2.6.4 for production apps in this scenario (rocket as a
>> service on windows server).
>>
>  --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/PEC1uLfzlrU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Re: Web2py freezing on live deployment!

2013-11-08 Thread Tim Richardson

>
> I had a puzzling problem with 2.7.4 as a rocket service on Windows 2003, 
> but this was a problem with sqlform.grids. There was a print statement left 
> in code which caused the service to stop working. This cause doesn't match 
> with your insights into the problem, but I mention it anyway. You only see 
> the problem when web2py is running as a service (I use nssm to create the 
> service, but this is not relevant). 
>
 

> The problem was very quickly fixed in trunk, but as far as I know the fix 
> is not in any stable version yet. 
>
 

> I'm still using 2.6.4 for production apps in this scenario (rocket as a 
> service on windows server). 
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Re: Web2py freezing on live deployment!

2013-11-07 Thread Andrew Buchan
Thanks for the suggestions, gevent looks good but I am indeed using pyodbc
and this seems to be working with Apache so I'd rather stick with this for
time being. (Note I had to embedd the Python27.dll manifest into pyodbc.pyd
to get it to work with Apache).

The reason for using ajax in the first place was naivety. At the time I
simply looked up how to call a controller function from javascript and read
that ajax() was the way to do it, so proceeded with that without
understanding the implications.

The feature in question is a check list, which I go over with
jQuery.each(). If checked: copy the value to a hidden field, and call ajax
to insert a record in the database including that field and couple others.
Once done, set windows.location to same page to reaload it.
The page has a form on it elsewhere, so I didn't want to make this a form
as I kept getting a "confirm resubmission" popup (this is going from
memory, it was actually written a long time ago).

I've now changed it so each() collate all the values into a string (they're
ints) and pass to a url which I navigate to with windows.location, that
page does the insert and returns back to previous page. No ajax in there
whatsoever :-)
I'm scouring the code for other places where I may have placed asynchronous
calls next to synchronous ones, which will only have worked by
"coincidence" up till now...
I know, I know. I might just pick up my copy of the pragmatic programmer
and throw it at myself. Hard.








On Thu, Nov 7, 2013 at 7:26 AM, Niphlod  wrote:

> hard ? with DAL it's pretty easy if a module exposes the dbapi just
> force the driver and implement the connect method and it's usually good to
> go.
> I'll test it when I get back home.
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/PEC1uLfzlrU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Web2py freezing on live deployment!

2013-11-06 Thread Niphlod
hard ? with DAL it's pretty easy if a module exposes the dbapi just 
force the driver and implement the connect method and it's usually good to 
go.
I'll test it when I get back home.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Web2py freezing on live deployment!

2013-11-06 Thread Derek
It does look like there is a pure python implementation of TDS called 
pytds, which may actually work... the hard part would be getting web2py to 
use it...

On Wednesday, November 6, 2013 5:15:57 PM UTC-7, Derek wrote:
>
> Yea, I'm working on a communication layer for pyodbc or pypyodbc which 
> will handle requests with gevent, thus your application should yield 
> properly, but it's not available just yet, and it won't necessarily be a 
> drop-in replacement for pyodbc though. In the meantime, this is usually 
> good enough, and you can set timeouts for the queries and connects, but 
> that would be a change to the DAL.
>
> On Wednesday, November 6, 2013 4:50:33 PM UTC-7, Niphlod wrote:
>>
>>
>>
>> On Thursday, November 7, 2013 12:23:06 AM UTC+1, Derek wrote:
>>>
>>> Ah, if you are on Windows, I would recommend you run it with gevent 
>>> instead of rocket, it should be faster than even apache.
>>>
>>> unfortunately it doesn't work as happily as it should: if you're using 
>> any non-green module (he's working with mssql, hence either pyodbc or 
>> pypyodbc, that are not), those libraries don't "yield", so you block all 
>> other greenlets in the meantime.
>> Without an upstream proxy balancing to multiple gevented web2py(s) if you 
>> have a "blocking" query to the database you queue up basically all other 
>> connections. I guess that  without an apache ProxyBalancer (or a much 
>> yummier gunicorn, as it stands due in two 
>> months) 
>> those web2py windows apps with non-green modules will run more 
>> "concurrently-friendly" with any "old" threaded webserver.
>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Web2py freezing on live deployment!

2013-11-06 Thread Derek
Yea, I'm working on a communication layer for pyodbc or pypyodbc which will 
handle requests with gevent, thus your application should yield properly, 
but it's not available just yet, and it won't necessarily be a drop-in 
replacement for pyodbc though. In the meantime, this is usually good 
enough, and you can set timeouts for the queries and connects, but that 
would be a change to the DAL.

On Wednesday, November 6, 2013 4:50:33 PM UTC-7, Niphlod wrote:
>
>
>
> On Thursday, November 7, 2013 12:23:06 AM UTC+1, Derek wrote:
>>
>> Ah, if you are on Windows, I would recommend you run it with gevent 
>> instead of rocket, it should be faster than even apache.
>>
>> unfortunately it doesn't work as happily as it should: if you're using 
> any non-green module (he's working with mssql, hence either pyodbc or 
> pypyodbc, that are not), those libraries don't "yield", so you block all 
> other greenlets in the meantime.
> Without an upstream proxy balancing to multiple gevented web2py(s) if you 
> have a "blocking" query to the database you queue up basically all other 
> connections. I guess that  without an apache ProxyBalancer (or a much 
> yummier gunicorn, as it stands due in two 
> months) 
> those web2py windows apps with non-green modules will run more 
> "concurrently-friendly" with any "old" threaded webserver.
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Web2py freezing on live deployment!

2013-11-06 Thread Niphlod


On Thursday, November 7, 2013 12:23:06 AM UTC+1, Derek wrote:
>
> Ah, if you are on Windows, I would recommend you run it with gevent 
> instead of rocket, it should be faster than even apache.
>
> unfortunately it doesn't work as happily as it should: if you're using any 
non-green module (he's working with mssql, hence either pyodbc or pypyodbc, 
that are not), those libraries don't "yield", so you block all other 
greenlets in the meantime.
Without an upstream proxy balancing to multiple gevented web2py(s) if you 
have a "blocking" query to the database you queue up basically all other 
connections. I guess that  without an apache ProxyBalancer (or a much 
yummier gunicorn, as it stands due in two 
months) 
those web2py windows apps with non-green modules will run more 
"concurrently-friendly" with any "old" threaded webserver.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Re: Web2py freezing on live deployment!

2013-11-06 Thread Derek
Yea, the ajax running synchronously - you provide callbacks because they do 
run asynchronously. 
To quote the jQuery book:

The* first letter in Ajax stands for "asynchronous,"* meaning that the 
operation occurs in parallel and the order of completion is not guaranteed. 
The async option to $.ajax() defaults to true, indicating that code 
execution can continue after the request is made. Setting this option to 
false (and thus making the call no longer asynchronous) is strongly 
discouraged, as it can cause the browser to become unresponsive.

Just what kind of app do you have that needs to make synchronous requests? 
Why are you not batching requests and processing async?

On Wednesday, November 6, 2013 4:32:54 PM UTC-7, Ricardo Pedroso wrote:
>
> On Tue, Nov 5, 2013 at 11:53 AM, Andrew Buchan 
> > wrote:
>
>> Ok, the IT guy has disabled McAffee's "on access" scan for the folders 
>> containing web2py stuff as well as python's installation directory. He 
>> tells me that parts of McAffee other than "on access" scan may still 
>> interfere but there's not much we can do about that. This hasn't made any 
>> difference.
>> As for the ajax calls, I thought it might be to do with the asynchronous 
>> calls taking too long when the server is overloaded (and it seems it is 
>> being hammered intermittently by another application), but I checked my 
>> web2py_ajax.html file and the ajax function is set to "async: false", so 
>> there shouldn't be an issue there unless there is some kind of timeout that 
>> kicks in?
>>
>> But I was about to post the above when I did some checks on the ajax 
>> calls, and am a bit confused...
>> I have two javascript functions which call ajax:
>>
>> #Function1:  This call displays a check list of 'previous contracts' to 
>> pick from
>> ajax('HubForms/Timesheets/AjaxReturnBlank', [], 
>> 'PreviousContractListingArea');
>>
>> #Function2:  Once user has check some items, they click a button to call 
>> this, which adds all selected contracts to timesheet, then reloads the page.
>> jQuery('.PreviousContractCheckbox').each(
>> function(index)
>> {
>> if(this.checked)
>> {
>> jQuery('#ContractId').val(this.name);
>> ajax('HubForms/Timesheets/AjaxAddContractToTimesheet', 
>> ['ContractId', 'TimesheetId', 'UserId']);
>> }
>> }
>> );
>> a='nothing, just works';
>> window.location='HubForms/Timesheets/ViewTimesheet?Timesheet_Id=15995';
>> location.reload(true);
>>
>> I temporarily modified the ajax function in web2py_ajax.html to display a 
>> pop-up, then wait 3 seconds before executing (last 4 lines modified):
>>
>>  function ajax(u,s,t) {
>>   var query="";
>>   for(i=0; i>  if(i>0) query=query+"&";
>> 
>>  
>> query=query+encodeURIComponent(s[i])+"="+encodeURIComponent(document.getElementById(s[i]).value);
>>   }
>>   /*this line:
>>jQuery.ajax({type: "POST", url: u, data: query, async: false, 
>> success: function(msg) { if(t==':eval') eval(msg); else 
>> document.getElementById(t).innerHTML=msg; } }); 
>>   replaced by these 4 lines:
>>   */
>>   alert('hi');
>>   setTimeout(function(){
>>   jQuery.ajax({type: "POST", url: u, data: query, async: false, success: 
>> function(msg) { if(t==':eval') eval(msg); else 
>> document.getElementById(t).innerHTML=msg; } })
>>   },3000);  
>> }
>>
>> The funny thing is that my Function1 does this (says 'hi' then pauses for 
>> 3 seconds), but Function2 says 'hi' for every item selected as you'd 
>> expect, but does NOT pause...
>> This is making me wonder whether web2py's ajax function behaves 
>> differently when called from inside jQuery().each() as the setTimeout() 
>> is being ignored...? 
>>
>
> I don't have a solution for your problem, if you could make a minimal 
> application that replicates the problem, it would
> be easy to track it down.
>  
> setTimeout will not pause javascript execution, it will only put the given 
> function in a "queue" to be processed later.
>
> Why are you doing an ajax call for each item checked?
> I think you could just make one ajax call with a list of checked items, it 
> would be more efficient.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Re: Web2py freezing on live deployment!

2013-11-06 Thread Ricardo Pedroso
On Tue, Nov 5, 2013 at 11:53 AM, Andrew Buchan  wrote:

> Ok, the IT guy has disabled McAffee's "on access" scan for the folders
> containing web2py stuff as well as python's installation directory. He
> tells me that parts of McAffee other than "on access" scan may still
> interfere but there's not much we can do about that. This hasn't made any
> difference.
> As for the ajax calls, I thought it might be to do with the asynchronous
> calls taking too long when the server is overloaded (and it seems it is
> being hammered intermittently by another application), but I checked my
> web2py_ajax.html file and the ajax function is set to "async: false", so
> there shouldn't be an issue there unless there is some kind of timeout that
> kicks in?
>
> But I was about to post the above when I did some checks on the ajax
> calls, and am a bit confused...
> I have two javascript functions which call ajax:
>
> #Function1:  This call displays a check list of 'previous contracts' to
> pick from
> ajax('HubForms/Timesheets/AjaxReturnBlank', [],
> 'PreviousContractListingArea');
>
> #Function2:  Once user has check some items, they click a button to call
> this, which adds all selected contracts to timesheet, then reloads the page.
> jQuery('.PreviousContractCheckbox').each(
> function(index)
> {
> if(this.checked)
> {
> jQuery('#ContractId').val(this.name);
> ajax('HubForms/Timesheets/AjaxAddContractToTimesheet',
> ['ContractId', 'TimesheetId', 'UserId']);
> }
> }
> );
> a='nothing, just works';
> window.location='HubForms/Timesheets/ViewTimesheet?Timesheet_Id=15995';
> location.reload(true);
>
> I temporarily modified the ajax function in web2py_ajax.html to display a
> pop-up, then wait 3 seconds before executing (last 4 lines modified):
>
>  function ajax(u,s,t) {
>   var query="";
>   for(i=0; i  if(i>0) query=query+"&";
>
>  
> query=query+encodeURIComponent(s[i])+"="+encodeURIComponent(document.getElementById(s[i]).value);
>   }
>   /*this line:
>jQuery.ajax({type: "POST", url: u, data: query, async: false,
> success: function(msg) { if(t==':eval') eval(msg); else
> document.getElementById(t).innerHTML=msg; } });
>   replaced by these 4 lines:
>   */
>   alert('hi');
>   setTimeout(function(){
>   jQuery.ajax({type: "POST", url: u, data: query, async: false, success:
> function(msg) { if(t==':eval') eval(msg); else
> document.getElementById(t).innerHTML=msg; } })
>   },3000);
> }
>
> The funny thing is that my Function1 does this (says 'hi' then pauses for
> 3 seconds), but Function2 says 'hi' for every item selected as you'd
> expect, but does NOT pause...
> This is making me wonder whether web2py's ajax function behaves
> differently when called from inside jQuery().each() as the setTimeout()
> is being ignored...?
>

I don't have a solution for your problem, if you could make a minimal
application that replicates the problem, it would
be easy to track it down.

setTimeout will not pause javascript execution, it will only put the given
function in a "queue" to be processed later.

Why are you doing an ajax call for each item checked?
I think you could just make one ajax call with a list of checked items, it
would be more efficient.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Web2py freezing on live deployment!

2013-11-06 Thread Derek
I'll also add this:
look at anyserver.py for how to get it going...

also, gevent does monkey.patch_all which means that all your tcp sockets 
would become async, which means if you are freezing up because a single 
connection is frozen, that won't be the case with gevent. Your individual 
connections would still be waiting but the server will process other 
requests while it waits for data. In other words, while one client may 
freeze up, the rest should process just fine.

On Wednesday, November 6, 2013 4:23:06 PM UTC-7, Derek wrote:
>
> Ah, if you are on Windows, I would recommend you run it with gevent 
> instead of rocket, it should be faster than even apache.
>
> On Monday, November 4, 2013 4:15:56 AM UTC-7, Andrew Buchan wrote:
>>
>>  Hi, 
>>  
>> I have a serious issue. Got a web2py install running as a service on a 
>> Windows 2003 box with SQL Server, with applications serving 100s of users 
>> in-house. We have a live and test application running on the same install 
>> but pointing to different databases, and due to things not being released 
>> these have diverged quote a bit over the months. We just managed to 
>> reconcile these (with carefully supervised migration - one table at a time) 
>> last week, and the problems started happening. Web2py becomes unresponsive 
>> after a period of use - it just hangs when you try to load a page. There 
>> are no errors in web2py, in the event manager, or SQL. Rolling back those 
>> changes is tricky, as there have been changes to the database and data has 
>> already been added.. 
>> When left running over the weekend, its fine. If I try accessing every 
>> page, it's fine (or at least, I can't break it). If it goes into proper use 
>> with lots of other people accessing it, it crashes.
>>  
>> I don't know how to find out what's going wrong. It's a relatively recent 
>> build of web2py, and I don't want to upgrade to throw yet another variable 
>> in there (there also been changes to the server it uses fro its mail 
>> function, though that seems to work fine, and we just removed IIS from the 
>> same server).
>>  
>> Any ideas why web2py would just freeze?
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Web2py freezing on live deployment!

2013-11-06 Thread Derek
Ah, if you are on Windows, I would recommend you run it with gevent instead 
of rocket, it should be faster than even apache.

On Monday, November 4, 2013 4:15:56 AM UTC-7, Andrew Buchan wrote:
>
>  Hi, 
>  
> I have a serious issue. Got a web2py install running as a service on a 
> Windows 2003 box with SQL Server, with applications serving 100s of users 
> in-house. We have a live and test application running on the same install 
> but pointing to different databases, and due to things not being released 
> these have diverged quote a bit over the months. We just managed to 
> reconcile these (with carefully supervised migration - one table at a time) 
> last week, and the problems started happening. Web2py becomes unresponsive 
> after a period of use - it just hangs when you try to load a page. There 
> are no errors in web2py, in the event manager, or SQL. Rolling back those 
> changes is tricky, as there have been changes to the database and data has 
> already been added.. 
> When left running over the weekend, its fine. If I try accessing every 
> page, it's fine (or at least, I can't break it). If it goes into proper use 
> with lots of other people accessing it, it crashes.
>  
> I don't know how to find out what's going wrong. It's a relatively recent 
> build of web2py, and I don't want to upgrade to throw yet another variable 
> in there (there also been changes to the server it uses fro its mail 
> function, though that seems to work fine, and we just removed IIS from the 
> same server).
>  
> Any ideas why web2py would just freeze?
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Re: Web2py freezing on live deployment!

2013-11-06 Thread Andrew Buchan
Hi Derek,

Thanks for replying, I had checked those but the last entry was months old,
so that was a dead end.

I finally got web2py running on Apache, though it took me till 5 am :-)
(ps: if anyone else plans on attempting to install Apache on Windows
against MSSQL, I'm happy to help out or write a tutorial, it wasn't
straightforward! Feel free to pm me)

I left both the rocket and the apache web2py installs live running on
separate servers (pointing to same database) and advised the users to work
on both. When I checked after a few hours, the rocket one had become
unresponsive, and apache was still running fine.

I think the problem is something to do with to the server being overloaded,
and perhaps ajax calls time out and holding locks on the sessions files,
causing the whole thing to become unresponsive. There were multiple threads
interacting with the same session files judging from the debugger... If
anyone would like me to do more investigation on this, I'm happy to help so
long as you tell me where to look.

Apache also caused a rather funny issue... A set of ajax calls which were
meant to run synchronously (because of "async: false" flag) was failing to
complete before page reload, whereas it always did before, leading me to
think Apache was not running it synchronously as instructed. What I think
is happening is that the ajax call never ran synchronously in the first
place (it's in a jQuery.each() loop) but on rocket it always finished on
time before the page reload, and apache seems to reload way faster so
caught me out.
Word to the wise: check any assumptions you make about ajax running
synchronously or not, especially as async: false is deprecated in jQuery
1.8.


On Wed, Nov 6, 2013 at 5:28 PM, Derek  wrote:

> Check the logs, find the last line in the log - that's probably what
> caused the freeze. Check your logging.conf to find out where the logs are
> kept.
>
>
> On Tuesday, November 5, 2013 1:59:43 PM UTC-7, Andrew Buchan wrote:
>>
>> Update:
>>
>> I made a copy of the web2py installation on a new server (still pointing
>> to old database) and eventually got it set it up as a service but it
>> still freezes with no errors in web2py or in the event manager...
>>
>> I'm pretty sure it's a programming error on my part somewhere or a
>> migration issue, but I need to be able to find out what it is!!! (people
>> are getting tetchy...)
>>
>> I went back to the original server and tried debugging using winpdb, and
>> it seems web2py gets stuck in a perpetual loop. When I pause, it tends to
>> stop in the "run" or "listen" methods in rocket.py, or "accept" in
>> socket.py (python installation dir), so the thread is running, just in a
>> loop and not responding to new requests...
>>
>> I'm thinking of putting the server onto apache to see if it behaves any
>> differently, but if anyone has any bright suggestions on what I can do to
>> find out what's going, I'm all ears :-)
>>
>>
>>
>>
>>
>>  --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/PEC1uLfzlrU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Web2py freezing on live deployment!

2013-11-06 Thread Derek
Check the logs, find the last line in the log - that's probably what caused 
the freeze. Check your logging.conf to find out where the logs are kept.

On Tuesday, November 5, 2013 1:59:43 PM UTC-7, Andrew Buchan wrote:
>
> Update:
>
> I made a copy of the web2py installation on a new server (still pointing 
> to old database) and eventually got it set it up as a service but it 
> still freezes with no errors in web2py or in the event manager...
>
> I'm pretty sure it's a programming error on my part somewhere or a 
> migration issue, but I need to be able to find out what it is!!! (people 
> are getting tetchy...)
>
> I went back to the original server and tried debugging using winpdb, and 
> it seems web2py gets stuck in a perpetual loop. When I pause, it tends to 
> stop in the "run" or "listen" methods in rocket.py, or "accept" in 
> socket.py (python installation dir), so the thread is running, just in a 
> loop and not responding to new requests...
>
> I'm thinking of putting the server onto apache to see if it behaves any 
> differently, but if anyone has any bright suggestions on what I can do to 
> find out what's going, I'm all ears :-)
>
>
>
>
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Web2py freezing on live deployment!

2013-11-05 Thread Andrew Buchan
Update:

I made a copy of the web2py installation on a new server (still pointing to 
old database) and eventually got it set it up as a service but it still 
freezes with no errors in web2py or in the event manager...

I'm pretty sure it's a programming error on my part somewhere or a 
migration issue, but I need to be able to find out what it is!!! (people 
are getting tetchy...)

I went back to the original server and tried debugging using winpdb, and it 
seems web2py gets stuck in a perpetual loop. When I pause, it tends to stop 
in the "run" or "listen" methods in rocket.py, or "accept" in socket.py 
(python installation dir), so the thread is running, just in a loop and not 
responding to new requests...

I'm thinking of putting the server onto apache to see if it behaves any 
differently, but if anyone has any bright suggestions on what I can do to 
find out what's going, I'm all ears :-)





-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Web2py freezing on live deployment!

2013-11-05 Thread Andrew Buchan
Ok, the IT guy has disabled McAffee's "on access" scan for the folders 
containing web2py stuff as well as python's installation directory. He 
tells me that parts of McAffee other than "on access" scan may still 
interfere but there's not much we can do about that. This hasn't made any 
difference.
As for the ajax calls, I thought it might be to do with the asynchronous 
calls taking too long when the server is overloaded (and it seems it is 
being hammered intermittently by another application), but I checked my 
web2py_ajax.html file and the ajax function is set to "async: false", so 
there shouldn't be an issue there unless there is some kind of timeout that 
kicks in?

But I was about to post the above when I did some checks on the ajax 
calls, and am a bit confused...
I have two javascript functions which call ajax:

#Function1:  This call displays a check list of 'previous contracts' to 
pick from
ajax('HubForms/Timesheets/AjaxReturnBlank', [], 
'PreviousContractListingArea');

#Function2:  Once user has check some items, they click a button to call 
this, which adds all selected contracts to timesheet, then reloads the page.
jQuery('.PreviousContractCheckbox').each(
function(index)
{
if(this.checked)
{
jQuery('#ContractId').val(this.name);
ajax('HubForms/Timesheets/AjaxAddContractToTimesheet', 
['ContractId', 'TimesheetId', 'UserId']);
}
}
);
a='nothing, just works';
window.location='HubForms/Timesheets/ViewTimesheet?Timesheet_Id=15995';
location.reload(true);

I temporarily modified the ajax function in web2py_ajax.html to display a 
pop-up, then wait 3 seconds before executing (last 4 lines modified):

 function ajax(u,s,t) {
  var query="";
  for(i=0; i0) query=query+"&";

 
query=query+encodeURIComponent(s[i])+"="+encodeURIComponent(document.getElementById(s[i]).value);
  }
  /*this line:
   jQuery.ajax({type: "POST", url: u, data: query, async: false, 
success: function(msg) { if(t==':eval') eval(msg); else 
document.getElementById(t).innerHTML=msg; } }); 
  replaced by these 4 lines:
  */
  alert('hi');
  setTimeout(function(){
  jQuery.ajax({type: "POST", url: u, data: query, async: false, success: 
function(msg) { if(t==':eval') eval(msg); else 
document.getElementById(t).innerHTML=msg; } })
  },3000);  
}

The funny thing is that my Function1 does this (says 'hi' then pauses for 3 
seconds), but Function2 says 'hi' for every item selected as you'd expect, 
but does NOT pause...
This is making me wonder whether web2py's ajax function behaves differently 
when called from inside jQuery().each() as the setTimeout() is being 
ignored...? 
If that is the case then perhaps the directive to use "async: false" is not 
being taken into account in this scenario?

Any javascript knowledgeable people able to help on this one?

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Web2py freezing on live deployment!

2013-11-04 Thread Andrew Buchan
It's running on rocket. I now think it's dying during a specific ajax call, 
but only some of the time and/or shortly after its called (there's usually 
a page load after it) and/or when it's excessively busy. Not sure if siege 
can automate the button clicks that trigger the ajax calls but I might be 
able to do something with selenium...

On Monday, November 4, 2013 4:26:21 PM UTC, LightDot wrote:
>
> Which version of web2py is it? Are you using gevent or rocket web server?
>
> Can you try load testing your devel version and see if you can replicate 
> the issue? You can use something like siege or a similar tool.
>
> Regards
>
>
> On Monday, November 4, 2013 4:56:32 PM UTC+1, Andrew Buchan wrote:
>>
>> Thanks Willoughby,
>>
>> We've got McAffee on that network, so have asked the IT guy to set it to 
>> ignore python and web2py folders. Will let you know what the upshot is once 
>> that's in place...
>>
>> Regards,
>>
>> Andy.
>>
>> On Monday, November 4, 2013 1:29:23 PM UTC, Willoughby wrote:
>>>
>>> Are you running Microsoft Endpoint Security?  I have problems with the 
>>> virus scanner 'locking up' things under even light usage.  One or two users 
>>> can bang all day, no problem but get more than 10 and it randomly freezes. 
>>>  Our fix was to exclude pretty much anything Python related.  YMMV.
>>>
>>> On Monday, November 4, 2013 6:15:56 AM UTC-5, Andrew Buchan wrote:

  Hi, 
  
 I have a serious issue. Got a web2py install running as a service on a 
 Windows 2003 box with SQL Server, with applications serving 100s of users 
 in-house. We have a live and test application running on the same install 
 but pointing to different databases, and due to things not being released 
 these have diverged quote a bit over the months. We just managed to 
 reconcile these (with carefully supervised migration - one table at a 
 time) 
 last week, and the problems started happening. Web2py becomes unresponsive 
 after a period of use - it just hangs when you try to load a page. There 
 are no errors in web2py, in the event manager, or SQL. Rolling back those 
 changes is tricky, as there have been changes to the database and data has 
 already been added.. 
 When left running over the weekend, its fine. If I try accessing every 
 page, it's fine (or at least, I can't break it). If it goes into proper 
 use 
 with lots of other people accessing it, it crashes.
  
 I don't know how to find out what's going wrong. It's a relatively 
 recent build of web2py, and I don't want to upgrade to throw yet another 
 variable in there (there also been changes to the server it uses fro its 
 mail function, though that seems to work fine, and we just removed IIS 
 from 
 the same server).
  
 Any ideas why web2py would just freeze?

>>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Web2py freezing on live deployment!

2013-11-04 Thread Derek
McAfee always seems to block things incorrectly, at least for me. 

On Monday, November 4, 2013 8:56:32 AM UTC-7, Andrew Buchan wrote:
>
> Thanks Willoughby,
>
> We've got McAffee on that network, so have asked the IT guy to set it to 
> ignore python and web2py folders. Will let you know what the upshot is once 
> that's in place...
>
> Regards,
>
> Andy.
>
> On Monday, November 4, 2013 1:29:23 PM UTC, Willoughby wrote:
>>
>> Are you running Microsoft Endpoint Security?  I have problems with the 
>> virus scanner 'locking up' things under even light usage.  One or two users 
>> can bang all day, no problem but get more than 10 and it randomly freezes. 
>>  Our fix was to exclude pretty much anything Python related.  YMMV.
>>
>> On Monday, November 4, 2013 6:15:56 AM UTC-5, Andrew Buchan wrote:
>>>
>>>  Hi, 
>>>  
>>> I have a serious issue. Got a web2py install running as a service on a 
>>> Windows 2003 box with SQL Server, with applications serving 100s of users 
>>> in-house. We have a live and test application running on the same install 
>>> but pointing to different databases, and due to things not being released 
>>> these have diverged quote a bit over the months. We just managed to 
>>> reconcile these (with carefully supervised migration - one table at a time) 
>>> last week, and the problems started happening. Web2py becomes unresponsive 
>>> after a period of use - it just hangs when you try to load a page. There 
>>> are no errors in web2py, in the event manager, or SQL. Rolling back those 
>>> changes is tricky, as there have been changes to the database and data has 
>>> already been added.. 
>>> When left running over the weekend, its fine. If I try accessing every 
>>> page, it's fine (or at least, I can't break it). If it goes into proper use 
>>> with lots of other people accessing it, it crashes.
>>>  
>>> I don't know how to find out what's going wrong. It's a relatively 
>>> recent build of web2py, and I don't want to upgrade to throw yet another 
>>> variable in there (there also been changes to the server it uses fro its 
>>> mail function, though that seems to work fine, and we just removed IIS from 
>>> the same server).
>>>  
>>> Any ideas why web2py would just freeze?
>>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Web2py freezing on live deployment!

2013-11-04 Thread LightDot
Which version of web2py is it? Are you using gevent or rocket web server?

Can you try load testing your devel version and see if you can replicate 
the issue? You can use something like siege or a similar tool.

Regards


On Monday, November 4, 2013 4:56:32 PM UTC+1, Andrew Buchan wrote:
>
> Thanks Willoughby,
>
> We've got McAffee on that network, so have asked the IT guy to set it to 
> ignore python and web2py folders. Will let you know what the upshot is once 
> that's in place...
>
> Regards,
>
> Andy.
>
> On Monday, November 4, 2013 1:29:23 PM UTC, Willoughby wrote:
>>
>> Are you running Microsoft Endpoint Security?  I have problems with the 
>> virus scanner 'locking up' things under even light usage.  One or two users 
>> can bang all day, no problem but get more than 10 and it randomly freezes. 
>>  Our fix was to exclude pretty much anything Python related.  YMMV.
>>
>> On Monday, November 4, 2013 6:15:56 AM UTC-5, Andrew Buchan wrote:
>>>
>>>  Hi, 
>>>  
>>> I have a serious issue. Got a web2py install running as a service on a 
>>> Windows 2003 box with SQL Server, with applications serving 100s of users 
>>> in-house. We have a live and test application running on the same install 
>>> but pointing to different databases, and due to things not being released 
>>> these have diverged quote a bit over the months. We just managed to 
>>> reconcile these (with carefully supervised migration - one table at a time) 
>>> last week, and the problems started happening. Web2py becomes unresponsive 
>>> after a period of use - it just hangs when you try to load a page. There 
>>> are no errors in web2py, in the event manager, or SQL. Rolling back those 
>>> changes is tricky, as there have been changes to the database and data has 
>>> already been added.. 
>>> When left running over the weekend, its fine. If I try accessing every 
>>> page, it's fine (or at least, I can't break it). If it goes into proper use 
>>> with lots of other people accessing it, it crashes.
>>>  
>>> I don't know how to find out what's going wrong. It's a relatively 
>>> recent build of web2py, and I don't want to upgrade to throw yet another 
>>> variable in there (there also been changes to the server it uses fro its 
>>> mail function, though that seems to work fine, and we just removed IIS from 
>>> the same server).
>>>  
>>> Any ideas why web2py would just freeze?
>>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Web2py freezing on live deployment!

2013-11-04 Thread Andrew Buchan
Thanks Willoughby,

We've got McAffee on that network, so have asked the IT guy to set it to 
ignore python and web2py folders. Will let you know what the upshot is once 
that's in place...

Regards,

Andy.

On Monday, November 4, 2013 1:29:23 PM UTC, Willoughby wrote:
>
> Are you running Microsoft Endpoint Security?  I have problems with the 
> virus scanner 'locking up' things under even light usage.  One or two users 
> can bang all day, no problem but get more than 10 and it randomly freezes. 
>  Our fix was to exclude pretty much anything Python related.  YMMV.
>
> On Monday, November 4, 2013 6:15:56 AM UTC-5, Andrew Buchan wrote:
>>
>>  Hi, 
>>  
>> I have a serious issue. Got a web2py install running as a service on a 
>> Windows 2003 box with SQL Server, with applications serving 100s of users 
>> in-house. We have a live and test application running on the same install 
>> but pointing to different databases, and due to things not being released 
>> these have diverged quote a bit over the months. We just managed to 
>> reconcile these (with carefully supervised migration - one table at a time) 
>> last week, and the problems started happening. Web2py becomes unresponsive 
>> after a period of use - it just hangs when you try to load a page. There 
>> are no errors in web2py, in the event manager, or SQL. Rolling back those 
>> changes is tricky, as there have been changes to the database and data has 
>> already been added.. 
>> When left running over the weekend, its fine. If I try accessing every 
>> page, it's fine (or at least, I can't break it). If it goes into proper use 
>> with lots of other people accessing it, it crashes.
>>  
>> I don't know how to find out what's going wrong. It's a relatively recent 
>> build of web2py, and I don't want to upgrade to throw yet another variable 
>> in there (there also been changes to the server it uses fro its mail 
>> function, though that seems to work fine, and we just removed IIS from the 
>> same server).
>>  
>> Any ideas why web2py would just freeze?
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Web2py freezing on live deployment!

2013-11-04 Thread Willoughby
Are you running Microsoft Endpoint Security?  I have problems with the 
virus scanner 'locking up' things under even light usage.  One or two users 
can bang all day, no problem but get more than 10 and it randomly freezes. 
 Our fix was to exclude pretty much anything Python related.  YMMV.

On Monday, November 4, 2013 6:15:56 AM UTC-5, Andrew Buchan wrote:
>
>  Hi, 
>  
> I have a serious issue. Got a web2py install running as a service on a 
> Windows 2003 box with SQL Server, with applications serving 100s of users 
> in-house. We have a live and test application running on the same install 
> but pointing to different databases, and due to things not being released 
> these have diverged quote a bit over the months. We just managed to 
> reconcile these (with carefully supervised migration - one table at a time) 
> last week, and the problems started happening. Web2py becomes unresponsive 
> after a period of use - it just hangs when you try to load a page. There 
> are no errors in web2py, in the event manager, or SQL. Rolling back those 
> changes is tricky, as there have been changes to the database and data has 
> already been added.. 
> When left running over the weekend, its fine. If I try accessing every 
> page, it's fine (or at least, I can't break it). If it goes into proper use 
> with lots of other people accessing it, it crashes.
>  
> I don't know how to find out what's going wrong. It's a relatively recent 
> build of web2py, and I don't want to upgrade to throw yet another variable 
> in there (there also been changes to the server it uses fro its mail 
> function, though that seems to work fine, and we just removed IIS from the 
> same server).
>  
> Any ideas why web2py would just freeze?
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: web2py freezing

2010-07-06 Thread Rowdy

mdipierro wrote:

It should be completely backward compatible. Without the new version
is difficult for me to help debug the problem.


I would like to follow up on this, but I have been moved onto another
project for a while.  It also seems that the replacement server is on
hold too, so I have argued the case for upgrading web2py, but was told
that it was a lower priority.  *sigh*

Rowdy



[web2py] Re: web2py freezing

2010-07-03 Thread mdipierro
It should be completely backward compatible. Without the new version
is difficult for me to help debug the problem.

On 3 Lug, 02:34, Rowdy  wrote:
> mdipierro wrote:
> > please upgrade to 1.79.2 and see if you still get the problem.
>
> > Massimo
>
> This is a production system and downtime would be troublesome - are
> there any differences between 1.76.5 and 1.79.2 that I should be aware
> of?  I have cron jobs, XML-RPC functions and a bunch of data entry pages
> using CRUD, SQLFORM and a few custom forms.
>
> The only reason I haven't had a chance to upgrade so far is lack of time
> to test the app in more recent versions of web2py.
>
> Thanx
>
> Rowdy


[web2py] Re: web2py freezing

2010-07-03 Thread Rowdy

mdipierro wrote:

please upgrade to 1.79.2 and see if you still get the problem.

Massimo


This is a production system and downtime would be troublesome - are
there any differences between 1.76.5 and 1.79.2 that I should be aware
of?  I have cron jobs, XML-RPC functions and a bunch of data entry pages
using CRUD, SQLFORM and a few custom forms.

The only reason I haven't had a chance to upgrade so far is lack of time
to test the app in more recent versions of web2py.

Thanx

Rowdy



[web2py] Re: web2py freezing

2010-07-03 Thread Rowdy

Candid wrote:

Every now and again there is a "BUG: unable to handle kernel paging
request at virtual address b79b3000", always in the web2py Python
process, and web2py more or less hangs.


Where do you see this error message?



In /var/log/syslog.

I usually `grep Oops /var/log/syslog` to see when and how often the oops
occurs - so far it has only been the web2py Python process.

Rowdy



[web2py] Re: web2py freezing

2010-07-03 Thread Rowdy

mdipierro wrote:

Do you see any issue with memory usage?



Overall it is difficult to tell as the server runs a few large
processes, including several big Java processes and a number of other
Python daemons, so overall memory usage (which is being graphed by
Cacti) is a bit all over the place anyway.

Should I be looking at the web2py Python process in particular?  if so I
can have a peek next time the server oops, as it happens fairly
regularly.

Rowdy



[web2py] Re: web2py freezing

2010-07-02 Thread Candid
Can anyone shed light on this question:

Also, am I missing something or rocket should close the connections
if
request is taking longer than 10 seconds (default timeout)? So if I
put time.sleep(20) in my controller it should times out? That's not
what's happening - the controller waits all those 20 seconds and
returns without any errors. Am I misunderstanding the timeout option?

On Jul 1, 12:13 pm, Candid  wrote:
> I will check memory usage next time it freezes but I am pretty sure
> it's OK.
> What do you mean by db log?
>
> Also, am I missing something or rocket should close the connections if
> request is taking longer than 10 seconds (default timeout)? So if I
> put time.sleep(20) in my controller it should times out? That's not
> what's happening - the controller waits all those 20 seconds and
> returns without any errors. Am I misunderstanding the timeout option?
>
> On Jul 1, 1:28 am, mdipierro  wrote:
>
>
>
> > Can you check memory usage when it freezes? Is there anything in the
> > db log about too many connections?
>
> > On 30 Giu, 16:06, Candid  wrote:
>
> > > I am using web2py in my organization for internal applications. One of
> > > the applications uses dedicated instance of web2py (v1.78.1) running
> > > on dedicated ubuntu server. It connects to our SQL Server 2005
> > > database via freetds. It runs with the following parameters:
>
> > > python web2py.py -i ... -p ... -a ... -n 100 -q 100
>
> > > The application uses connection pool with 50 connections.
>
> > > Recently it has started freezing occasionally. The weird thing is that
> > > the whole web2py server freezes and basically stops responding, so not
> > > only you cannot access the app, you cannot even open the admin
> > > console. Sometimes it starts working again after a few minutes,
> > > sometimes I have to restart web2py.
> > > I suspect it has something to with either web server threads not
> > > getting released or databases connections not getting returned to the
> > > pool (the latter would not explain why I cannot access admin console
> > > though).
>
> > > Has anyone had similar issues? Any suggestions on how to troubleshoot
> > > the problem? Any input would be highly appreciated.


[web2py] Re: web2py freezing

2010-07-02 Thread mdipierro
please upgrade to 1.79.2 and see if you still get the problem.

Massimo



On 2 Lug, 03:52, Rowdy  wrote:
>
> Greetings,
>
> I have a web2py application running in 1.76.5 (from source, and haven't
> had the chance to test the app in a more recent version of web2py).
>
> The server is running vanilla Ubuntu 7.10 with all the patches up to
> when support and security updates stopped.
>
> Every now and again there is a "BUG: unable to handle kernel paging
> request at virtual address b79b3000", always in the web2py Python
> process, and web2py more or less hangs.
>
> Actually XML-RPC calls timeout, web pages do not load, but the web2py
> internal cron keeps working and generating more Python processes (each
> of which also seems to hang).
>
> I need to kill -9 the processes and start it again.
>
> This did not happen at all during the previous 4 months of development
> on the same server, and does not happen at all in another NetBSD-based
> server that I have setup as a development/test environment.
>
> For various other reasons a replacement server is being commissioned at
> the moment, so restarting web2py every couple of days suffices for me
> for now.
>
> Rowdy


[web2py] Re: web2py freezing

2010-07-02 Thread Candid
> Every now and again there is a "BUG: unable to handle kernel paging
> request at virtual address b79b3000", always in the web2py Python
> process, and web2py more or less hangs.

Where do you see this error message?

On Jul 2, 4:52 am, Rowdy  wrote:
> Candid wrote:
> > I am using web2py in my organization for internal applications. One of
> > the applications uses dedicated instance of web2py (v1.78.1) running
> > on dedicated ubuntu server. It connects to our SQL Server 2005
> > database via freetds. It runs with the following parameters:
>
> > python web2py.py -i ... -p ... -a ... -n 100 -q 100
>
> > The application uses connection pool with 50 connections.
>
> > Recently it has started freezing occasionally. The weird thing is that
> > the whole web2py server freezes and basically stops responding, so not
> > only you cannot access the app, you cannot even open the admin
> > console. Sometimes it starts working again after a few minutes,
> > sometimes I have to restart web2py.
> > I suspect it has something to with either web server threads not
> > getting released or databases connections not getting returned to the
> > pool (the latter would not explain why I cannot access admin console
> > though).
>
> > Has anyone had similar issues? Any suggestions on how to troubleshoot
> > the problem? Any input would be highly appreciated.
>
> Greetings,
>
> I have a web2py application running in 1.76.5 (from source, and haven't
> had the chance to test the app in a more recent version of web2py).
>
> The server is running vanilla Ubuntu 7.10 with all the patches up to
> when support and security updates stopped.
>
> Every now and again there is a "BUG: unable to handle kernel paging
> request at virtual address b79b3000", always in the web2py Python
> process, and web2py more or less hangs.
>
> Actually XML-RPC calls timeout, web pages do not load, but the web2py
> internal cron keeps working and generating more Python processes (each
> of which also seems to hang).
>
> I need to kill -9 the processes and start it again.
>
> This did not happen at all during the previous 4 months of development
> on the same server, and does not happen at all in another NetBSD-based
> server that I have setup as a development/test environment.
>
> For various other reasons a replacement server is being commissioned at
> the moment, so restarting web2py every couple of days suffices for me
> for now.
>
> Rowdy


[web2py] Re: web2py freezing

2010-07-02 Thread mdipierro
Do you see any issue with memory usage?

On 2 Lug, 03:52, Rowdy  wrote:
> Candid wrote:
> > I am using web2py in my organization for internal applications. One of
> > the applications uses dedicated instance of web2py (v1.78.1) running
> > on dedicated ubuntu server. It connects to our SQL Server 2005
> > database via freetds. It runs with the following parameters:
>
> > python web2py.py -i ... -p ... -a ... -n 100 -q 100
>
> > The application uses connection pool with 50 connections.
>
> > Recently it has started freezing occasionally. The weird thing is that
> > the whole web2py server freezes and basically stops responding, so not
> > only you cannot access the app, you cannot even open the admin
> > console. Sometimes it starts working again after a few minutes,
> > sometimes I have to restart web2py.
> > I suspect it has something to with either web server threads not
> > getting released or databases connections not getting returned to the
> > pool (the latter would not explain why I cannot access admin console
> > though).
>
> > Has anyone had similar issues? Any suggestions on how to troubleshoot
> > the problem? Any input would be highly appreciated.
>
> Greetings,
>
> I have a web2py application running in 1.76.5 (from source, and haven't
> had the chance to test the app in a more recent version of web2py).
>
> The server is running vanilla Ubuntu 7.10 with all the patches up to
> when support and security updates stopped.
>
> Every now and again there is a "BUG: unable to handle kernel paging
> request at virtual address b79b3000", always in the web2py Python
> process, and web2py more or less hangs.
>
> Actually XML-RPC calls timeout, web pages do not load, but the web2py
> internal cron keeps working and generating more Python processes (each
> of which also seems to hang).
>
> I need to kill -9 the processes and start it again.
>
> This did not happen at all during the previous 4 months of development
> on the same server, and does not happen at all in another NetBSD-based
> server that I have setup as a development/test environment.
>
> For various other reasons a replacement server is being commissioned at
> the moment, so restarting web2py every couple of days suffices for me
> for now.
>
> Rowdy


[web2py] Re: web2py freezing

2010-07-02 Thread Rowdy

Candid wrote:

I am using web2py in my organization for internal applications. One of
the applications uses dedicated instance of web2py (v1.78.1) running
on dedicated ubuntu server. It connects to our SQL Server 2005
database via freetds. It runs with the following parameters:

python web2py.py -i ... -p ... -a ... -n 100 -q 100

The application uses connection pool with 50 connections.

Recently it has started freezing occasionally. The weird thing is that
the whole web2py server freezes and basically stops responding, so not
only you cannot access the app, you cannot even open the admin
console. Sometimes it starts working again after a few minutes,
sometimes I have to restart web2py.
I suspect it has something to with either web server threads not
getting released or databases connections not getting returned to the
pool (the latter would not explain why I cannot access admin console
though).

Has anyone had similar issues? Any suggestions on how to troubleshoot
the problem? Any input would be highly appreciated.



Greetings,

I have a web2py application running in 1.76.5 (from source, and haven't
had the chance to test the app in a more recent version of web2py).

The server is running vanilla Ubuntu 7.10 with all the patches up to
when support and security updates stopped.

Every now and again there is a "BUG: unable to handle kernel paging
request at virtual address b79b3000", always in the web2py Python
process, and web2py more or less hangs.

Actually XML-RPC calls timeout, web pages do not load, but the web2py
internal cron keeps working and generating more Python processes (each
of which also seems to hang).

I need to kill -9 the processes and start it again.

This did not happen at all during the previous 4 months of development
on the same server, and does not happen at all in another NetBSD-based
server that I have setup as a development/test environment.

For various other reasons a replacement server is being commissioned at
the moment, so restarting web2py every couple of days suffices for me
for now.

Rowdy



[web2py] Re: web2py freezing

2010-07-01 Thread Candid
Here is Massimo's reply (sorry, I accidently hit "Reply to author"
button last time):

> I am not familiar with SQLserver 2005 but probably it has a log file where to 
> store errors. If it running out of connections it
> should say so there.
> let me know.

No, the db server itself is fine. We have many other systems relying
on this server and they work fine.

On Jul 1, 12:13 pm, Candid  wrote:
> I will check memory usage next time it freezes but I am pretty sure
> it's OK.
> What do you mean by db log?
>
> Also, am I missing something or rocket should close the connections if
> request is taking longer than 10 seconds (default timeout)? So if I
> put time.sleep(20) in my controller it should times out? That's not
> what's happening - the controller waits all those 20 seconds and
> returns without any errors. Am I misunderstanding the timeout option?
>
> On Jul 1, 1:28 am, mdipierro  wrote:
>
>
>
> > Can you check memory usage when it freezes? Is there anything in the
> > db log about too many connections?
>
> > On 30 Giu, 16:06, Candid  wrote:
>
> > > I am using web2py in my organization for internal applications. One of
> > > the applications uses dedicated instance of web2py (v1.78.1) running
> > > on dedicated ubuntu server. It connects to our SQL Server 2005
> > > database via freetds. It runs with the following parameters:
>
> > > python web2py.py -i ... -p ... -a ... -n 100 -q 100
>
> > > The application uses connection pool with 50 connections.
>
> > > Recently it has started freezing occasionally. The weird thing is that
> > > the whole web2py server freezes and basically stops responding, so not
> > > only you cannot access the app, you cannot even open the admin
> > > console. Sometimes it starts working again after a few minutes,
> > > sometimes I have to restart web2py.
> > > I suspect it has something to with either web server threads not
> > > getting released or databases connections not getting returned to the
> > > pool (the latter would not explain why I cannot access admin console
> > > though).
>
> > > Has anyone had similar issues? Any suggestions on how to troubleshoot
> > > the problem? Any input would be highly appreciated.


[web2py] Re: web2py freezing

2010-07-01 Thread Candid
I will check memory usage next time it freezes but I am pretty sure
it's OK.
What do you mean by db log?

Also, am I missing something or rocket should close the connections if
request is taking longer than 10 seconds (default timeout)? So if I
put time.sleep(20) in my controller it should times out? That's not
what's happening - the controller waits all those 20 seconds and
returns without any errors. Am I misunderstanding the timeout option?

On Jul 1, 1:28 am, mdipierro  wrote:
> Can you check memory usage when it freezes? Is there anything in the
> db log about too many connections?
>
> On 30 Giu, 16:06, Candid  wrote:
>
>
>
> > I am using web2py in my organization for internal applications. One of
> > the applications uses dedicated instance of web2py (v1.78.1) running
> > on dedicated ubuntu server. It connects to our SQL Server 2005
> > database via freetds. It runs with the following parameters:
>
> > python web2py.py -i ... -p ... -a ... -n 100 -q 100
>
> > The application uses connection pool with 50 connections.
>
> > Recently it has started freezing occasionally. The weird thing is that
> > the whole web2py server freezes and basically stops responding, so not
> > only you cannot access the app, you cannot even open the admin
> > console. Sometimes it starts working again after a few minutes,
> > sometimes I have to restart web2py.
> > I suspect it has something to with either web server threads not
> > getting released or databases connections not getting returned to the
> > pool (the latter would not explain why I cannot access admin console
> > though).
>
> > Has anyone had similar issues? Any suggestions on how to troubleshoot
> > the problem? Any input would be highly appreciated.


[web2py] Re: web2py freezing

2010-06-30 Thread mdipierro
Can you check memory usage when it freezes? Is there anything in the
db log about too many connections?

On 30 Giu, 16:06, Candid  wrote:
> I am using web2py in my organization for internal applications. One of
> the applications uses dedicated instance of web2py (v1.78.1) running
> on dedicated ubuntu server. It connects to our SQL Server 2005
> database via freetds. It runs with the following parameters:
>
> python web2py.py -i ... -p ... -a ... -n 100 -q 100
>
> The application uses connection pool with 50 connections.
>
> Recently it has started freezing occasionally. The weird thing is that
> the whole web2py server freezes and basically stops responding, so not
> only you cannot access the app, you cannot even open the admin
> console. Sometimes it starts working again after a few minutes,
> sometimes I have to restart web2py.
> I suspect it has something to with either web server threads not
> getting released or databases connections not getting returned to the
> pool (the latter would not explain why I cannot access admin console
> though).
>
> Has anyone had similar issues? Any suggestions on how to troubleshoot
> the problem? Any input would be highly appreciated.