Forum

Slow pdf iframe

indra praditya
8 July 2014, 23:33
Hiawatha version: v9.6, SSL (1.3.7), URL toolkit, XSLT
Operating System: CentOS 6.5 / 64 Bit

when using hiawatha very slow open document
very fast when using apache, whta the problem,

here my config :
ServerId = apache
ServerString = WebServer
ConnectionsTotal = 2048
ConnectionsPerIP = 50
SocketSendTimeout = 60
LogFormat = extended
ExecuteCGI = yes
CacheSize = 50
SystemLogfile = /var/log/hiawatha/system.log
GarbageLogfile = /var/log/hiawatha/garbage.log

Binding {
Port = 80
}

ConnectionsTotal = 200
ConnectionsPerIP = 1000

CGIhandler = /usr/bin/php-cgi:php,php5,do
CGIextension = cgi

FastCGIserver {
FastCGIid = dv
ConnectTo = 127.0.0.1:9000
Extension = php, php5, do
SessionTimeout = 30
}

Hostname = 127.0.0.1
WebsiteRoot = /opt/html
StartFile = index.html

UrlToolkit {
ToolkitID = codeigniter
RequestURI exists Exit
Match .* Rewrite /index.php
}

VirtualHost {
Hostname = test.example.com
WebsiteRoot = /var/www/html
StartFile = index.php
UseToolkit = codeigniter
TimeForCGI = 60
UseFastCGI = dv
TriggerOnCGIstatus = no
ExecuteCGI = yes
PreventCSRF = yes
PreventSQLi = yes
PreventXSS = yes
AccessLogfile = /var/log/hiawatha/vdmi.access.log
ErrorLogfile = /var/log/hiawatha/vdmi.error.log
ErrorHandler = 404:/error.cgi
}


zeplin
8 July 2014, 23:56
I am having the same problem as well
James
8 July 2014, 23:57
I would seriously consider using ruby on rails instead. Here is a great tutorial https://onemonth.com/courses/one-month-rails/
Hugo Leisink
9 July 2014, 09:09
I have no idea. I need a bit more information than only "it's slow". Hiawatha is not slow, many tests prove that [www.saltwaterc.ro]. Even when the webserver is under attack. Try without the PreventCSRF, PreventSQLi and PreventXSS settings. You should only use them when they are really needed.


@James: No offense, but Ruby on Rails has had it best days. It's not here to stay. I strongly advice PHP. You want to do PHP good? Try Banshee [www.banshee-php.org].
indra praditya
9 July 2014, 14:10

grep -i Prevent /etc/hiawatha/hiawatha.conf
#PreventCSRF = yes
#PreventSQLi = yes
#PreventXSS = yes

and restart servis hiawatha

same problem, slow open document with iframe
when download document very vast

and test with add SecureURL = no, still slow open document pdf

Hugo Leisink
9 July 2014, 14:11
Do you have an URL for me so I can see and test for myself?
indra praditya
9 July 2014, 14:19
Hugo Leisink
9 July 2014, 14:39
My advice is to install Fiddler [www.telerik.com]. Fiddler is a local proxy with an interface. A brilliant tool for bug hunting and security testing. Start browsing via this local proxy and request your website. You'll see several HTTP errors on your page. For example the Content-Length your website sends for the PDF does not match the actual size. That's why Hiawatha gets confused and slows down. It waits for the rest to come. I think the cause is in the gzipping. You calculate the length of the PDF, print a Content-Length header, gzip the content and send it. After the gzipping, the length of the content has changed!
indra praditya
9 July 2014, 14:43
Thanks Hugo, with your help, I will try to fix it
This topic has been closed.