Opened 3 years ago

Closed 3 years ago

#11289 closed Bug/Something is broken (fixed)

java on floriberto

Reported by: Owned by: Jamie McClelland
Priority: Medium Component: Tech
Keywords: Cc:
Sensitive: no


I am just realizing that I am using cssembed for assets generation and needs a /usr/bin/java On the computer I use for development I have openjdk-7-jre-headless may I ask if it (or another java) could be installed on floriberto by any chance?

Change History (8)

comment:1 Changed 3 years ago by JaimeV

Owner: set to Jamie McClelland
Status: newassigned

Hi, sorry for the delay. Let's get jamie's opinion on installing openjdk-7-jre-headless in floriberto. Do you need to automate the conversion of image urls to embedded data uri's on a regular basis?


comment:2 Changed 3 years ago by Jamie McClelland

I'm ok with installing this on floriberto is needed (probably not a candidate for installing on all moshes) but if this is for one time asset generation - I wonder if a better workflow would be to generate them locally and then copy to the server?


comment:3 Changed 3 years ago by

Happy New Year! It is for a website written with Symphony. Symfony has a very popular bundle named Assetic for assets generation, which comes configured to use java. It is used in maintainance scripts and it is automatically called after each software update. My first impression is that it may need some amount of work to replace it.

comment:4 Changed 3 years ago by Jamie McClelland

I just install the jre-headless package which brought in these packages:

  ca-certificates-java java-common libasyncns0 libnspr4 libnss3 libpcsclite1 libpulse0
  libsctp1 libsndfile1 libxtst6 openjdk-7-jre-headless tzdata-java

So you can keep things up dated.

I'm not that familiar with symfony so I don't have a good understanding of the workflow. Is it possible to run the software updates on your dev machines and then push to the live server?

comment:5 Changed 3 years ago by

Thanks, java works fine and I have been able to generate assets.

The question about updates and workflow is good. At this point, I would tell all documentations seems to me like doing it on the live server. Does it include the reality of shared servers? It is maybe not a priority for all open source software developers. Now, it is not clear for me which command may or may not touch the db. I know it is recommended to clear cache after asset upgrade. But I am not sure where is the cache. Doing asset generation on a distant machine would need more reading, more testing and makes things more complicated if at some point somebody else than me has to do the maintenance. But I understand that we always have to keep searching for solutions to preserve the live servers.

My first idea was to use $ ionice --class idle nice -n 127 ... and to do it in the middle of the night. The batch command from the at package was another thing I though about, it can launch the command only when the cpu load is low enough. It could be used in addition to the first one. The last idea was to check if HHVM can make the script use less memory or less cpu, it may be possible to install it on jessie.

I know we have to be careful with nice, because it can block memory. So even if I am optimistic, I should evaluate the memory usage for asset generation. If you can recommend a good way to measure memory for a script, I am interested. It is a php script calling nodejs and java.

Last edited 3 years ago by (previous) (diff)

comment:6 Changed 3 years ago by

I even asking me if I should use a "linux batch queue system" for all non interactive jobs. It would make sure that only one of such jobs is executed at the same time.

Some have Debian packages: task-spooler,at (batch),slurm-wlm,htcondor,...

I would need to investigate a bit more before to make a proposal.


batch (at)



comment:7 Changed 3 years ago by Jamie McClelland

I'm less worried about overburdening the server by running the assets generation code and more worried about needing a suite of tools on the server that aren't typically available on servers. I'm glad we are able to get you the tools you need - but it would be ideal if your web site only need a minimal set (in case we ever have to move it to a different server or we upgrade the server and a tool is no longer available).

To check for resource usage of a script I don't have any great suggestions - other than running the script and then running top and watching the RSS column.


comment:8 Changed 3 years ago by

Resolution: fixed
Status: assignedclosed

Thanks for your advice! It's better to be prudent...

Please login to add comments to this ticket.

Note: See TracTickets for help on using tickets.