Posts by Daniel Cukier • 596 points
17 posts
-
2
votes1
answer156
viewsA: Solr I/O increases over time
The answer to this question is linked with the content of that post. What happens in this case is that the searches of this system depend on a lot of reading of the indexes of solr. Since indexes…
-
4
votes1
answer156
viewsQ: Solr I/O increases over time
I’m running about eight servers with solr Servers (version 3.5) behind a Load Balancer. All servers are identical and LB is set to weight by the number of connections. The servers have about 4…
-
1
votes1
answer223
viewsA: Request timeout with Nginx, Unicorn and Rails
The configuration used is correct. The problem in this case is that the server is after a load balancer in Rackspace, which has by default 30 seconds of timeout. To change that value follow these…
-
0
votes1
answer223
viewsQ: Request timeout with Nginx, Unicorn and Rails
I have an application in Rails that runs with Unicorn in production. Some calls take a long time to process. I set the server to increase the timeout, so that the server does not respond with error.…
-
10
votes1
answer292
viewsQ: Scala memory leak and processes (memory Leak)
I have a fairly complex system in Scala, with multiple threads and simultaneous system calls. This system is having some problem, because busy memory grows over time. The image below shows the…
-
2
votes0
answers147
viewsQ: Send local files to Google Cloud Storage in Scala
How do I upload a local file to Google Cloud Storage using the Scala language? This file needs to be publicly accessible for download. Post in English…
-
1
votes1
answer164
viewsQ: Generate offline Rails application
I have a very simple Rails application, with only one controller and two actions. Basically it’s pages with images, css, and some Java. I would like to generate a version of this application that…
-
8
votes2
answers654
viewsQ: Performance of query LIKE in Mysql
Is there any way to increase the performance of a query with LIKE '%string%' in Mysql? I know that if the LIKE for 'string%', is faster. The problem is when the % is at the beginning of the string.…
-
3
votes1
answer3217
viewsQ: How to prevent a simple query from traversing the entire Mysql database
I have an application in Rails that uses a Mysql database with a table with millions of rows. Sometimes it happens that some part of my application does a very heavy query, locking all the rest of…
-
0
votes0
answers62
viewsQ: Detecting Slow Queries in Rackspace’s Mysql
There is an easy way to see the slow queries in Mysql from Rackspace? I tried to those instructions, but they’re very complicated... Original post in English…
-
3
votes2
answers64
viewsQ: How to iterate over a huge amount of records with scala sorm
I want to iterate over a lot of records from a table with sorm, but I want to do it in a memory efficient way. Today I use this code: Db.query[Items].whereEqual("title", someTitle).fetch.foreach {…
-
3
votes2
answers87
viewsQ: How to extract json from a jsonp in a Scala string
I’m using Scala and I have an http response like this: _SS_MainSolrCallbackH( { response: { numFound: 1, start: 0, maxScore: 4.9338827, docs: [ { tipo: "M", id: "mus1933196",a s: 4.9338827, u:…
-
2
votes1
answer465
viewsA: How to use java.String.format in Scala?
You do not need to use numbers to indicate position. By default, the argument position is simply the order in which it appears in the string. Here’s an example of how to use this: String result =…
-
3
votes1
answer465
viewsQ: How to use java.String.format in Scala?
I’m trying to use the method .format string. But if I put %1, %2, etc. in the string, the java.util exception.Unknownformatconversionexception is released, pointing to a confusing Java code: private…
-
5
votes1
answer79
viewsA: Converting Case to Underscore in Ruby
Rails' Activesupport adds underscore to the String class using this code: class String def underscore self.gsub(/::/, '/'). gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2'). gsub(/([a-z\d])([A-Z])/,'\1_\2').…
-
3
votes1
answer79
viewsQ: Converting Case to Underscore in Ruby
There is a ready-to-use function that converts Strings to Camel case for strings separated by underscores? I wish something like that: "CamelCaseString".to_underscore return "camel_case_string".…
-
3
votes1
answer199
viewsQ: How to randomly shuffle an Array in Ruby?
I would like to have the items in an array shuffled. Something like this: [1,2,3,4].scramble => [2,1,3,4] [1,2,3,4].scramble => [3,1,2,4] [1,2,3,4].scramble => [4,2,3,1] and so on,…