Aerospike Node.js client log

When I’m running my node.js app, every time my app made a connection to the Aerospike server - " INFO (28106) [as_cluster.c:124] [as_cluster_add_nodes_copy] - Add node BB9853992913CF2" pops up. I have tried to set - log: { level: Aerospike.log.OFF } but it keeps popping. How do I stop it?

Since this is a log message from the Aerospike C client library, you will need to use Aerospike.setDefaultLogging to disable it, e.g.

const Aerospike = require('aerospike')
Aerospike.setDefaultLogging({level: Aerospike.log.OFF})
1 Like

You are awesome slight_smile:

Btw, for the next Aerospike Node.js client release, I am planing to change the default log level from INFO to WARN.

That would be great. I know it’s off the topic but you guys really have a rich documentation but personally, I feel like it’s a bit vaguely structured and as a newcomer, I really had a tough time to navigate. Aerospike is one of the coolest yet fastest of it’s kind. It’s really simple and it’s fun yet when someone who is interacting first time with Aerospike through the documentation, it would remind them “Alice in Wonderland”. Despite all, I LOVE AEROSPIKE. I want to grow my business with it so I hope for the best.

Thanks! Are you referring specifically to the API docs for the Node.js client or the general docs at Aerospike Technical Documentation | Aerospike Documentation? Any specific suggestions for how to improve the docs would be very much appreciated!

Thank you, Jan for allowing me to share my thought. As I said, the documentation is nice and I know, it takes a lot of times & efforts to come this far. So in advance, I apologize if any of my opinions offend you guys in any manner.

I was introduced to Aerospike via a blog post. I was desperate to find a database technology that could offer speed and scalability at the same time and I found Aerospike. I had no prior knowledge about it. All I knew is that Aerospike is a NoSQL database software & It’s open-source. So I decided to jump on Aerospike website. I came to learn more about your technology and culture but unfortunately, I felt like I came to a corporate website that is only offering a premium product. There’s no How does it works or Getting started page. So I stepped back and try to find more about “your product” from other sources. Of course, I could just browse a longer and I would get what I needed but in every scenario, the Documentation page is three clicks away and I was already overwhelmed by Products and Customers and Solutions… If I could see the Documentation link directly on the header I would not go other places.

Anyway, I came back after I studied, Took the liberty to find where your Documentation link is hiding. Eventually, I found it and in an instant, I flooded with all the information that is kept on a single page. You guys have tons of information. Yes! Content is king but visual design leads our eyes and one gigantic expendable entry point is a game of puzzle in itself. But the worse part of this transaction is unbearable on page link navigations. Every link you guys put on your documentation 60% of them we visit to enhance the subject knowledge and 80% of the time we intend to come back so maybe a blank page option should be considered. Perhaps it’s my visual ignorance but up until now, trust me I thought your API Docs only exist on www.aerospike.com/apidocs I was bit surprised when I find out you guys have such a nice API Docs what I just found 7+ days later :blush:

I know there’s some flow of my self but I think if you guys look at your analytics you will find after 5 minutes of reading people are visiting links like crazy and often they will be steeped out without any rational excuse.

I know most of its sound like hate taking but I assure you I haven’t felt more comfortable with any other database software as I do with aerospike and no matter what I won’t stop using it. But as of newcomers, It would be nicer for them If you guys just make some little adjustment here and there!

Jan, Thanks again!

Hi @al-mehedi,

Thanks for the detailed feedback - no offence taken!

Maybe you could elaborate a bit on this part:

What is the problem with “page link navigations” that makes you say it’s “unbearable”? I also don’t quite understand what a “blank page option” might be.

Cheers, Jan

Hello Jan,

Sorry for the delay, Actually I was referring to the on page href links. when a user clicks a link on the page it instantly take the user on another part of that page or in a brand new page in the same tab. Of course, it’s the common way to navigate through a documentation but often after 3 or 4 clicks down the chain, I personally feel a bit lost and it’s really hard to understand a subject matter when I have to visit back and forth. I think for a link that points to a brand new page, a separate browser tab could be helpful.

Another thing I noticed that some of the titles contain very useful yet overwhelming information which is intended for expert users, But sometimes resides next to an introductory title, I think for the sake of the newcomers every introductory title should contain a navigation link, something like What should be the next step! this way user would grow their basic knowledge without interfering with expert level stuff. :expressionless: I could be totally wrong so never mind.

Anyway, I was meaning to ask you- Why exactly Aerospike.connect is preferred over Client.connect? I could not find any solid answer. & recently I had a problem with my Aerospike put method. I put multiple data to the database and close the underlying connections but after a couple of minutes if I want to repeat the same process Aerospike says It’s released event loop resources I searched and find out the close(false) fix. It’s working but I could not find enough information to understand in which circumstance aerospike releases the event loop and If I don’t release the event loop at all, how much would it impact to my main event loop & overall node performance?

Thank you!

I think all major browsers have ways to open links in a new tab if that’s what you want.

Aerospike.connect(config, client -> {
    ...
    client.close()
})

Is equivalent to:

const client = Aerospike.client(config)
client.connect(() -> {
    ...
    client.close()
})

It’s more a matter of taste, which one you pick. I should probably remove that statement from the docs saying that Aerospike.connect() is the recommended way to connect to the cluster and just state that they are equivalent.

If you have a need to write data to the Aerospike cluster “every couple of minutes” you should just keep the connection open, I think. If you do want to close and re-open it every time, then you do indeed need to call client.close(false) to prevent the Aerospike module from releasing it’s event loop resources (libuv timers and other libuv handles).

The Aerospike module maintains an internal count of the number of active Client instances, i.e. clients which haven’t been close()'d yet. When you call close() and the counter reaches zero, the module will automatically release the event loop, unless you call close(releaseEventLoop=false).

Not releasing the module’s event loop resources does not have any impact on your app’s performance it the client is not actively being used.

Thanks, Now its much more convenient for me to work around client connection. Always appreciate your suggestion. :slightly_smiling_face:

This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.