Demo won't render, until I kill the server.

54 views
Skip to first unread message

Eric Dykstra

unread,
Mar 10, 2013, 11:30:12 AM3/10/13
to sil...@googlegroups.com
Hey everyone,

I installed SlikJS on Linux Mint 14 (Ubuntu version) and it went perfectly smooth, except I had to change the 'GROUP = admin' in the Makefile to 'GROUP = sudo'.

When I start it with './silkjs http/main.js', there are no error messages and all looks fine. I then point my client to 'http://localhost:9090' but the page never finishes loading and remains blank.

Now the strange part - if I do a 'CTRL-C' to kill the server, the web page then instantly shows up, although I obviously can't navigate it any further.

What am I doing wrong?

Thanks,

Eric


Michael Schwartz

unread,
Mar 10, 2013, 11:52:11 AM3/10/13
to sil...@googlegroups.com
Which Ubuntu version?

I assume Quantal Quetzal

I'm installing it now to see what the issue is.

--
You received this message because you are subscribed to the Google Groups "SilkJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to silkjs+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Derek Gransaull

unread,
Mar 11, 2013, 7:03:54 AM3/11/13
to sil...@googlegroups.com
A couple of us have seen this issue of the page not loading fully on Ubuntu 12.04. I've posted about it on GitHub.

Thanks,

Derek

Michael Schwartz

unread,
Mar 11, 2013, 12:19:42 PM3/11/13
to sil...@googlegroups.com
What kernel version does 12.04 use?

It seems something is subtly changed in the kernel networking implementation.  I want to be sure when researching the change and the workaround/fix that I'm looking at the right release notes and source code.

I'm not seeing any issues on OSX, so this appears to be related to Linux deployment only.  That's a clue as well :)

Michael Schwartz

unread,
Mar 11, 2013, 2:24:50 PM3/11/13
to sil...@googlegroups.com
I just wanted to give you all an update.

Something has changed in v8 proper that is breaking SilkJS.  I'm digging into the release notes and google groups messages about what they're up to.

There's quite a few warnings about deprecated functions in v8 that are being called.  I am going to start by fixing those.

On Mar 11, 2013, at 4:03 AM, Derek Gransaull <de...@dgtlife.com> wrote:

Eric Dykstra

unread,
Mar 11, 2013, 3:54:34 PM3/11/13
to sil...@googlegroups.com
UPDATE:

Mike worked through this with me and found the root cause. 

After a simple:

git pull
make realclean
make
sudo make install

Everything works as expected in Debian Squeeze and on Linux Mint 14.

The only 'gotcha' to watch for, is that you may need to edit the 'GROUP=admin' in the /src/Makefile to suit your environment for the user you are compiling as. For me, I simply changed it to 'GROUP=sudo'.

Thanks Mike and everyone!

Michael Schwartz

unread,
Mar 11, 2013, 3:56:41 PM3/11/13
to sil...@googlegroups.com
And another update.

The issue is with newer versions of the v8 engine.  I've fixed the Makefile for Ubuntu to checkout an older version of v8 during the initial build process.

It works flawlessly on a newly created Linux MINT 14 instance for me.

You can either check out the repo again or:

$ make realclean
$ make
$ sudo make install

Please let me know if you have problems with this.

Note: I did not fix the makefiles for other operating systems.  It works great for me 

Derek Gransaull

unread,
Mar 11, 2013, 6:42:18 PM3/11/13
to sil...@googlegroups.com
Mike:

Firstly, thanks for making and sharing SilkJS! And now thanks for being so very responsive to issues like this that inevitably come up.

Derek

Richard Bettelheim

unread,
Mar 12, 2013, 10:43:52 AM3/12/13
to sil...@googlegroups.com
Hi Derek,

This fixes it for me on Ubuntu 12.04. I did not have to change anything in the makefile.

Thanks a lot for the quick turn around.

Cheers,
Richard.

Michael Schwartz

unread,
Mar 12, 2013, 12:33:36 PM3/12/13
to sil...@googlegroups.com
I'll explain what's going on, in case it helps anyone now or later on.

At some point, the developers and maintainers of libmemcached made some radical API changes.  Some of the older Ubuntu distributions will install versions of libmemcached before those API changes, and newer distributions install versions of libmemcached after those API changes.  My attempts to detect new vs. old API in the SilkJS memcached source code do not work in all versions of all the flavors of Linux out there.  So I went to the -DNEW_MEMCACHED switch on the compiler command line.

I generally do install some flavors of Linux in VMs here to test the build process and to see SilkJS works, but I don't have the bandwidth to test against every version of every flavor, etc.  When someone using some flavor of Linux has issues, I'm happy to look directly at those and find a resolution.

Regards

Derek Gransaull

unread,
Mar 12, 2013, 6:06:50 PM3/12/13
to sil...@googlegroups.com
Richard:

Great to hear. Mike and Eric did the heavy lifting; I just drew your attention to it. :-) 

Derek

Richard Bettelheim

unread,
Mar 15, 2013, 10:34:39 AM3/15/13
to sil...@googlegroups.com
Hi Michael,

As i said, the latest build works now on Ubuntu 12.04 and pretty fast.
I tried the various "ab tests" after increasing the files limit (ulimit -n) and it is quite impressive. 

However, there is also a consistent number of failed connections: always 50, which hints to 1 per child-process regardless of the concurrency or file size and which seems to be associated with some contentions as a very small number of requests execute in 6-7 seconds while the vast majority run in < 10ms.

Let me know if there is a test I can run to help you debug this issue. I am going also to try on another Linux distro, Fedora or Mint to check if it is Ubuntu specific ...

Regards,

Richard.

On Tuesday, March 12, 2013 7:43:52 AM UTC-7, Richard Bettelheim wrote:

Michael Schwartz

unread,
Mar 15, 2013, 11:19:08 AM3/15/13
to sil...@googlegroups.com
Maybe you need to start out with a fresh clone?

It seems to work fine for me, though if you are doing your test differently, it'd help to show me what you are doing.

mschwartz@presto:~/src/SilkJS$ httpd-silk.js
14118 Started logfile process 14120
SilkJSx HTTP running with 50 children on port 9090 from documentRoot httpd/docroot

mschwartz@presto:~$ ab -t 30 -k -c 25 http://localhost:9090/anchor.png
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient)
Completed 5000 requests
Completed 10000 requests
Completed 15000 requests
Completed 20000 requests
Completed 25000 requests
Completed 30000 requests
Completed 35000 requests
Completed 40000 requests
Completed 45000 requests
Completed 50000 requests
Finished 50000 requests


Server Software:        SILK
Server Hostname:        localhost
Server Port:            9090

Document Path:          /anchor.png
Document Length:        523 bytes

Concurrency Level:      25
Time taken for tests:   1.470 seconds
Complete requests:      50000

Failed requests:        0    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<-------------

Write errors:           0
Keep-Alive requests:    50000
Total transferred:      37700000 bytes
HTML transferred:       26150000 bytes

Requests per second:    34011.99 [#/sec] (mean) <<<<<<<<<<<<<<<<<<------

Time per request:       0.735 [ms] (mean)
Time per request:       0.029 [ms] (mean, across all concurrent requests)
Transfer rate:          25043.98 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       1
Processing:     0    1   0.8      0      14
Waiting:        0    1   0.8      0      14
Total:          0    1   0.8      0      14
WARNING: The median and mean for the processing time are not within a normal deviation
        These results are probably not that reliable.
WARNING: The median and mean for the waiting time are not within a normal deviation
        These results are probably not that reliable.
WARNING: The median and mean for the total time are not within a normal deviation
        These results are probably not that reliable.

Percentage of the requests served within a certain time (ms)
  50%      0
  66%      1
  75%      1
  80%      1
  90%      2
  95%      2
  98%      3
  99%      4

 100%     14 (longest request) <<<<<<<<<<<<<<<<<<<<<<<<<<<


mschwartz@presto:~$

Richard Bettelheim

unread,
Mar 16, 2013, 3:46:29 AM3/16/13
to sil...@googlegroups.com


On Sunday, March 10, 2013 8:30:12 AM UTC-7, Eric Dykstra wrote:
Reply all
Reply to author
Forward
0 new messages