These are chat archives for jruby-gradle/jruby-gradle-plugin

6th
Apr 2016
Christian Meier
@mkristian
Apr 06 2016 09:03 UTC
@rtacconi I revisited my branch and fixed a few things. the jruby code was not working at all but now I tested it by unzipping the zip and adding all jars from lib/ directory to classpath and executing the main class 'A'. also added a few debug classes which may or may not help to get some more inside where things go wrong.
Riccardo Tacconi
@rtacconi
Apr 06 2016 10:35 UTC
@ysb33r @mkristian sorry this morning I am very busy, I will try the code again. I was thinking about the zipping problem: last time I had that problem AWS could not find the handler (the java class). So I do not think it is the zip task is an issue. mkristian for 'my branch' do you mean better-jruby-handling branch? Can I test it again?
Christian Meier
@mkristian
Apr 06 2016 10:36 UTC
yes the 'better-jruby-handling' one, yes you can. it has a few fixes in it.
take your time, I am usually around here
Riccardo Tacconi
@rtacconi
Apr 06 2016 11:35 UTC
@mkristian I just tried better-jruby-handling and it times out after 59 seconds which is the max limit I can set. Logs go to Cloudwatch but I just can see that the function timed out after 59 seconds.
Riccardo Tacconi
@rtacconi
Apr 06 2016 11:57 UTC
good news: after building the zip, I extracted it and zipped the content not the folder, I uploaded the zip and I had a out of memory error. I had to increase the memory to 256MB to remove the error, then it worked. So it is a zip problem not a Java issue. The usage of memory is much higher than Python, with python I have just 128MB and it shows it is using only 96MB.
Christian Meier
@mkristian
Apr 06 2016 12:11 UTC
@rtacconi yes, jruby needs at least 386M java heap or even more. do you have a manual zip-file which works now ?
Riccardo Tacconi
@rtacconi
Apr 06 2016 12:12 UTC
yes I do. I hope to manage to use gradle to zip it properly
Christian Meier
@mkristian
Apr 06 2016 12:13 UTC
could you gist me unzip -l working.zip - then I could see to fix the gradle thing to create the same
Riccardo Tacconi
@rtacconi
Apr 06 2016 12:13 UTC
sure
Christian Meier
@mkristian
Apr 06 2016 12:22 UTC
oh - there are few things:
  • the stdlib which jruby really can not use as it is or as it was added to the LOAD_PATH in the old implementation
  • lib/aws-lambda-jruby-jruby.jar is much smaller with me
  • lib/aws-lambda-jruby.jar is also much smaller but could be just the added stdlib bits in it
    two things: first: unzip -l lib/aws-lambda-jruby.jar and unzip -l lib/aws-lambda-jruby-jruby.jar. and second: does the zip still works when you remove the stdlib/** bits ?
Christian Meier
@mkristian
Apr 06 2016 12:28 UTC
beside those differences the only other thing is you are using 1.10.67 of the aws jars and I am on 1.10.66 - doubt this is the problem.
Schalk W. Cronjé
@ysb33r
Apr 06 2016 12:31 UTC
You should consider to use the distribution plugin and then just configure that distZip task that it installs. It might take care of putting most things in the ZIP that you need.
Riccardo Tacconi
@rtacconi
Apr 06 2016 14:01 UTC
I will have a look at the distribution plugin, thanks